Showing preview only (937K chars total). Download the full file or copy to clipboard to get everything.
Repository: go-kit/kit
Branch: master
Commit: 78fbbceece7b
Files: 288
Total size: 869.1 KB
Directory structure:
gitextract_llwttmje/
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yaml
│ │ ├── config.yml
│ │ └── feature_request.yaml
│ └── workflows/
│ ├── .editorconfig
│ └── ci.yml
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── auth/
│ ├── basic/
│ │ ├── README.md
│ │ ├── middleware.go
│ │ └── middleware_test.go
│ ├── casbin/
│ │ ├── middleware.go
│ │ ├── middleware_test.go
│ │ └── testdata/
│ │ ├── basic_model.conf
│ │ ├── basic_policy.csv
│ │ └── keymatch_policy.csv
│ └── jwt/
│ ├── README.md
│ ├── middleware.go
│ ├── middleware_test.go
│ ├── transport.go
│ └── transport_test.go
├── circuitbreaker/
│ ├── doc.go
│ ├── gobreaker.go
│ ├── gobreaker_test.go
│ ├── handy_breaker.go
│ ├── handy_breaker_test.go
│ ├── hystrix.go
│ ├── hystrix_test.go
│ └── util_test.go
├── codecov.yml
├── docker-compose-integration.yml
├── endpoint/
│ ├── doc.go
│ ├── endpoint.go
│ └── endpoint_example_test.go
├── examples/
│ └── README.md
├── go.mod
├── go.sum
├── lint
├── log/
│ ├── README.md
│ ├── deprecated_levels/
│ │ ├── levels.go
│ │ └── levels_test.go
│ ├── doc.go
│ ├── example_test.go
│ ├── json_logger.go
│ ├── level/
│ │ ├── doc.go
│ │ ├── example_test.go
│ │ └── level.go
│ ├── log.go
│ ├── logfmt_logger.go
│ ├── logrus/
│ │ ├── logrus_logger.go
│ │ └── logrus_logger_test.go
│ ├── nop_logger.go
│ ├── stdlib.go
│ ├── sync.go
│ ├── syslog/
│ │ ├── example_test.go
│ │ └── syslog.go
│ ├── term/
│ │ ├── colorlogger.go
│ │ ├── colorwriter.go
│ │ ├── example_test.go
│ │ └── term.go
│ ├── value.go
│ └── zap/
│ ├── zap_sugar_logger.go
│ └── zap_sugar_logger_test.go
├── metrics/
│ ├── README.md
│ ├── cloudwatch/
│ │ ├── cloudwatch.go
│ │ └── cloudwatch_test.go
│ ├── cloudwatch2/
│ │ ├── cloudwatch2.go
│ │ └── cloudwatch2_test.go
│ ├── discard/
│ │ └── discard.go
│ ├── doc.go
│ ├── dogstatsd/
│ │ ├── dogstatsd.go
│ │ └── dogstatsd_test.go
│ ├── expvar/
│ │ ├── expvar.go
│ │ └── expvar_test.go
│ ├── generic/
│ │ ├── generic.go
│ │ └── generic_test.go
│ ├── graphite/
│ │ ├── graphite.go
│ │ └── graphite_test.go
│ ├── influx/
│ │ ├── example_test.go
│ │ ├── influx.go
│ │ └── influx_test.go
│ ├── influxstatsd/
│ │ ├── influxstatsd.go
│ │ └── influxstatsd_test.go
│ ├── internal/
│ │ ├── convert/
│ │ │ ├── convert.go
│ │ │ └── convert_test.go
│ │ ├── lv/
│ │ │ ├── labelvalues.go
│ │ │ ├── labelvalues_test.go
│ │ │ ├── space.go
│ │ │ └── space_test.go
│ │ └── ratemap/
│ │ └── ratemap.go
│ ├── metrics.go
│ ├── multi/
│ │ ├── multi.go
│ │ └── multi_test.go
│ ├── pcp/
│ │ ├── pcp.go
│ │ └── pcp_test.go
│ ├── prometheus/
│ │ ├── prometheus.go
│ │ └── prometheus_test.go
│ ├── provider/
│ │ ├── discard.go
│ │ ├── dogstatsd.go
│ │ ├── expvar.go
│ │ ├── graphite.go
│ │ ├── influx.go
│ │ ├── prometheus.go
│ │ ├── provider.go
│ │ └── statsd.go
│ ├── statsd/
│ │ ├── statsd.go
│ │ └── statsd_test.go
│ ├── teststat/
│ │ ├── buffers.go
│ │ ├── populate.go
│ │ └── teststat.go
│ ├── timer.go
│ └── timer_test.go
├── ratelimit/
│ ├── token_bucket.go
│ └── token_bucket_test.go
├── sd/
│ ├── benchmark_test.go
│ ├── consul/
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ ├── integration_test.go
│ │ ├── registrar.go
│ │ └── registrar_test.go
│ ├── dnssrv/
│ │ ├── doc.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ └── lookup.go
│ ├── doc.go
│ ├── endpoint_cache.go
│ ├── endpoint_cache_test.go
│ ├── endpointer.go
│ ├── endpointer_test.go
│ ├── etcd/
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── example_test.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ ├── integration_test.go
│ │ ├── registrar.go
│ │ └── registrar_test.go
│ ├── etcdv3/
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── example_test.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ ├── integration_test.go
│ │ ├── registrar.go
│ │ └── registrar_test.go
│ ├── eureka/
│ │ ├── doc.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ ├── integration_test.go
│ │ ├── registrar.go
│ │ ├── registrar_test.go
│ │ └── util_test.go
│ ├── factory.go
│ ├── instancer.go
│ ├── internal/
│ │ └── instance/
│ │ ├── cache.go
│ │ └── cache_test.go
│ ├── lb/
│ │ ├── balancer.go
│ │ ├── doc.go
│ │ ├── random.go
│ │ ├── random_test.go
│ │ ├── retry.go
│ │ ├── retry_test.go
│ │ ├── round_robin.go
│ │ └── round_robin_test.go
│ ├── registrar.go
│ └── zk/
│ ├── client.go
│ ├── client_test.go
│ ├── doc.go
│ ├── instancer.go
│ ├── instancer_test.go
│ ├── integration_test.go
│ ├── logwrapper.go
│ ├── registrar.go
│ └── util_test.go
├── tracing/
│ ├── README.md
│ ├── doc.go
│ ├── opencensus/
│ │ ├── doc.go
│ │ ├── endpoint.go
│ │ ├── endpoint_options.go
│ │ ├── endpoint_test.go
│ │ ├── grpc.go
│ │ ├── grpc_test.go
│ │ ├── http.go
│ │ ├── http_test.go
│ │ ├── jsonrpc.go
│ │ ├── jsonrpc_test.go
│ │ ├── opencensus_test.go
│ │ └── tracer_options.go
│ ├── opentracing/
│ │ ├── doc.go
│ │ ├── endpoint.go
│ │ ├── endpoint_options.go
│ │ ├── endpoint_test.go
│ │ ├── grpc.go
│ │ ├── grpc_test.go
│ │ ├── http.go
│ │ └── http_test.go
│ └── zipkin/
│ ├── README.md
│ ├── doc.go
│ ├── endpoint.go
│ ├── endpoint_test.go
│ ├── grpc.go
│ ├── grpc_test.go
│ ├── http.go
│ ├── http_test.go
│ └── options.go
├── transport/
│ ├── amqp/
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── publisher.go
│ │ ├── publisher_test.go
│ │ ├── request_response_func.go
│ │ ├── subscriber.go
│ │ ├── subscriber_test.go
│ │ └── util.go
│ ├── awslambda/
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── handler.go
│ │ ├── handler_test.go
│ │ └── request_response_funcs.go
│ ├── doc.go
│ ├── error_handler.go
│ ├── error_handler_test.go
│ ├── grpc/
│ │ ├── README.md
│ │ ├── _grpc_test/
│ │ │ ├── client.go
│ │ │ ├── context_metadata.go
│ │ │ ├── pb/
│ │ │ │ ├── generate.go
│ │ │ │ ├── test.pb.go
│ │ │ │ ├── test.proto
│ │ │ │ └── test_grpc.pb.go
│ │ │ ├── request_response.go
│ │ │ ├── server.go
│ │ │ └── service.go
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── request_response_funcs.go
│ │ └── server.go
│ ├── http/
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── example_test.go
│ │ ├── intercepting_writer.go
│ │ ├── intercepting_writer_test.go
│ │ ├── jsonrpc/
│ │ │ ├── README.md
│ │ │ ├── client.go
│ │ │ ├── client_test.go
│ │ │ ├── doc.go
│ │ │ ├── encode_decode.go
│ │ │ ├── error.go
│ │ │ ├── error_test.go
│ │ │ ├── request_response_types.go
│ │ │ ├── request_response_types_test.go
│ │ │ ├── server.go
│ │ │ └── server_test.go
│ │ ├── proto/
│ │ │ ├── client.go
│ │ │ ├── generate.go
│ │ │ ├── proto_pb_test.go
│ │ │ ├── proto_test.go
│ │ │ ├── proto_test.proto
│ │ │ └── server.go
│ │ ├── request_response_funcs.go
│ │ ├── request_response_funcs_test.go
│ │ ├── server.go
│ │ └── server_test.go
│ ├── httprp/
│ │ ├── doc.go
│ │ ├── server.go
│ │ └── server_test.go
│ ├── nats/
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── publisher.go
│ │ ├── publisher_test.go
│ │ ├── request_response_funcs.go
│ │ ├── subscriber.go
│ │ └── subscriber_test.go
│ ├── netrpc/
│ │ └── README.md
│ └── thrift/
│ └── README.md
└── util/
├── README.md
└── conn/
├── doc.go
├── manager.go
└── manager_test.go
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: [peterbourgon]
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yaml
================================================
name: Bug report
description: Report a bug
labels: [bug]
body:
- type: textarea
attributes:
label: What did you do?
validations:
required: true
- type: textarea
attributes:
label: What did you expect?
validations:
required: true
- type: textarea
attributes:
label: What happened instead?
validations:
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/go-kit/kit/discussions/new?category=q-a
about: Questions and discussions with the Go kit community
- name: Website
url: https://gokit.io/
about: Project overview, examples, frequently asked questions, etc.
- name: Reference
url: https://pkg.go.dev/github.com/go-kit/kit
about: Go kit package documentation
- name: Slack channel
url: https://gophers.slack.com/messages/go-kit
about: Real-time discussions and Q&A
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yaml
================================================
name: Feature request
description: Suggest new functionality or an enhancement
body:
- type: textarea
attributes:
label: What would you like?
validations:
required: true
================================================
FILE: .github/workflows/.editorconfig
================================================
[*.yml]
indent_size = 2
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix: # Support latest and one minor back
go: ["1.17", "1.18", "1.19"]
env:
GOFLAGS: -mod=readonly
services:
etcd:
image: gcr.io/etcd-development/etcd:v3.5.0
ports:
- 2379
env:
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
options: --health-cmd "ETCDCTL_API=3 etcdctl --endpoints http://localhost:2379 endpoint health" --health-interval 10s --health-timeout 5s --health-retries 5
consul:
image: consul:1.10
ports:
- 8500
zk:
image: zookeeper:3.5
ports:
- 2181
eureka:
image: springcloud/eureka
ports:
- 8761
env:
eureka.server.responseCacheUpdateIntervalMs: 1000
steps:
- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
stable: "false"
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v2
- name: Run tests
env:
ETCD_ADDR: http://localhost:${{ job.services.etcd.ports[2379] }}
CONSUL_ADDR: localhost:${{ job.services.consul.ports[8500] }}
ZK_ADDR: localhost:${{ job.services.zk.ports[2181] }}
EUREKA_ADDR: http://localhost:${{ job.services.eureka.ports[8761] }}/eureka
run: go test -v -race -coverprofile=coverage.coverprofile -covermode=atomic -tags integration ./...
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.coverprofile
================================================
FILE: .gitignore
================================================
*.coverprofile
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
_old*
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
# https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
# swap
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
First, thank you for contributing! We love and encourage pull requests from everyone.
Before submitting major changes, here are a few guidelines to follow:
1. Check the [open issues][issues] and [pull requests][prs] for existing discussions.
1. Open an [issue][issues] first, to discuss a new feature or enhancement.
1. Write tests, and make sure the test suite passes locally and on CI.
1. Open a pull request, and reference the relevant issue(s).
1. After receiving feedback, [squash your commits][squash] and add a [great commit message][message].
1. Have fun!
[issues]: https://github.com/go-kit/kit/issues
[prs]: https://github.com/go-kit/kit/pulls
[squash]: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
[message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Peter Bourgon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Go kit

[](https://pkg.go.dev/github.com/go-kit/kit?tab=doc)
[](https://codecov.io/gh/go-kit/kit)
[](https://goreportcard.com/report/go-kit/kit)
[](https://sourcegraph.com/github.com/go-kit/kit?badge)
**Go kit** is a **programming toolkit** for building microservices
(or elegant monoliths) in Go. We solve common problems in distributed
systems and application architecture so you can focus on delivering
business value.
- Website: [gokit.io](https://gokit.io)
- Mailing list: [go-kit](https://groups.google.com/forum/#!forum/go-kit)
- Slack: [gophers.slack.com](https://gophers.slack.com) **#go-kit** ([invite](https://gophersinvite.herokuapp.com/))
## Sponsors
<div>
<a href="https://encore.dev" style="display: inline-flex; align-items: center; gap: 10px">
<img src="https://user-images.githubusercontent.com/78424526/214602214-52e0483a-b5fc-4d4c-b03e-0b7b23e012df.svg" height="28px" alt="encore icon"></img>
<b>Encore – the platform for building Go-based cloud backends.</b>
</a>
</div>
<br/>
Click [here](https://github.com/sponsors/peterbourgon) or Sponsor, above, for more information on sponsorship.
## Motivation
Go has emerged as the language of the server, but it remains underrepresented
in so-called "modern enterprise" companies like Facebook, Twitter, Netflix, and
SoundCloud. Many of these organizations have turned to JVM-based stacks for
their business logic, owing in large part to libraries and ecosystems that
directly support their microservice architectures.
To reach its next level of success, Go needs more than simple primitives and
idioms. It needs a comprehensive toolkit, for coherent distributed programming
in the large. Go kit is a set of packages and best practices, which provide a
comprehensive, robust, and trustable way of building microservices for
organizations of any size.
For more details, see
[the website](https://gokit.io),
[the motivating blog post](http://peter.bourgon.org/go-kit/) and
[the video of the talk](https://www.youtube.com/watch?v=iFR_7AKkJFU).
See also the
[Go kit talk at GopherCon 2015](https://www.youtube.com/watch?v=1AjaZi4QuGo).
## Goals
- Operate in a heterogeneous SOA — expect to interact with mostly non-Go-kit services
- RPC as the primary messaging pattern
- Pluggable serialization and transport — not just JSON over HTTP
- Operate within existing infrastructures — no mandates for specific tools or technologies
## Non-goals
- Supporting messaging patterns other than RPC (for now) — e.g. MPI, pub/sub, CQRS, etc.
- Re-implementing functionality that can be provided by adapting existing software
- Having opinions on operational concerns: deployment, configuration, process supervision, orchestration, etc.
## Contributing
Please see [CONTRIBUTING.md](/CONTRIBUTING.md).
Thank you, [contributors](https://github.com/go-kit/kit/graphs/contributors)!
## Dependency management
Go kit is [modules](https://github.com/golang/go/wiki/Modules) aware, and we
encourage users to use the standard modules tooling. But Go kit is at major
version 0, so it should be compatible with non-modules environments.
## Code generators
There are several third-party tools that can generate Go kit code based on
different starting assumptions.
- [RecoLabs/microgen](https://github.com/RecoLabs/microgen)
- [GrantZheng/kit](https://github.com/GrantZheng/kit)
- [kujtimiihoxha/kit](https://github.com/kujtimiihoxha/kit) (unmaintained)
- [nytimes/marvin](https://github.com/nytimes/marvin)
- [sagikazarmark/mga](https://github.com/sagikazarmark/mga)
- [sagikazarmark/protoc-gen-go-kit](https://github.com/sagikazarmark/protoc-gen-go-kit)
- [metaverse/truss](https://github.com/metaverse/truss)
- [goadesign/goakit](https://github.com/goadesign/plugins/tree/v3/goakit)
## Related projects
Projects with a ★ have had particular influence on Go kit's design (or vice-versa).
### Service frameworks
- [gizmo](https://github.com/nytimes/gizmo), a microservice toolkit from The New York Times ★
- [go-micro](https://github.com/micro/go-micro), a distributed systems development framework ★
- [gotalk](https://github.com/rsms/gotalk), async peer communication protocol & library
- [Kite](https://github.com/koding/kite), a micro-service framework
- [gocircuit](https://github.com/gocircuit/circuit), dynamic cloud orchestration
### Individual components
- [afex/hystrix-go](https://github.com/afex/hystrix-go), client-side latency and fault tolerance library
- [armon/go-metrics](https://github.com/armon/go-metrics), library for exporting performance and runtime metrics to external metrics systems
- [codahale/lunk](https://github.com/codahale/lunk), structured logging in the style of Google's Dapper or Twitter's Zipkin
- [eapache/go-resiliency](https://github.com/eapache/go-resiliency), resiliency patterns
- [sasbury/logging](https://github.com/sasbury/logging), a tagged style of logging
- [grpc/grpc-go](https://github.com/grpc/grpc-go), HTTP/2 based RPC
- [inconshreveable/log15](https://github.com/inconshreveable/log15), simple, powerful logging for Go ★
- [mailgun/vulcand](https://github.com/vulcand/vulcand), programmatic load balancer backed by etcd
- [mattheath/phosphor](https://github.com/mondough/phosphor), distributed system tracing
- [pivotal-golang/lager](https://github.com/pivotal-golang/lager), an opinionated logging library
- [rubyist/circuitbreaker](https://github.com/rubyist/circuitbreaker), circuit breaker library
- [sirupsen/logrus](https://github.com/sirupsen/logrus), structured, pluggable logging for Go ★
- [sourcegraph/appdash](https://github.com/sourcegraph/appdash), application tracing system based on Google's Dapper
- [spacemonkeygo/monitor](https://github.com/spacemonkeygo/monitor), data collection, monitoring, instrumentation, and Zipkin client library
- [streadway/handy](https://github.com/streadway/handy), net/http handler filters
- [vitess/rpcplus](https://godoc.org/github.com/youtube/vitess/go/rpcplus), package rpc + context.Context
- [gdamore/mangos](https://github.com/gdamore/mangos), nanomsg implementation in pure Go
### Web frameworks
- [Gorilla](http://www.gorillatoolkit.org)
- [Gin](https://gin-gonic.com/)
- [Negroni](https://github.com/codegangsta/negroni)
- [Goji](https://github.com/zenazn/goji)
- [Martini](https://github.com/go-martini/martini)
- [Beego](https://beego.vip/)
- [Revel](https://revel.github.io/) (considered [harmful](https://github.com/go-kit/kit/issues/350))
- [GoBuffalo](https://gobuffalo.io/)
## Additional reading
- [Architecting for the Cloud](https://slideshare.net/stonse/architecting-for-the-cloud-using-netflixoss-codemash-workshop-29852233) — Netflix
- [Dapper, a Large-Scale Distributed Systems Tracing Infrastructure](http://research.google.com/pubs/pub36356.html) — Google
- [Your Server as a Function](http://monkey.org/~marius/funsrv.pdf) (PDF) — Twitter
================================================
FILE: auth/basic/README.md
================================================
This package provides a Basic Authentication middleware.
It'll try to compare credentials from Authentication request header to a username/password pair in middleware constructor.
More details about this type of authentication can be found in [Mozilla article](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication).
## Usage
```go
import httptransport "github.com/go-kit/kit/transport/http"
httptransport.NewServer(
AuthMiddleware(cfg.auth.user, cfg.auth.password, "Example Realm")(makeUppercaseEndpoint()),
decodeMappingsRequest,
httptransport.EncodeJSONResponse,
httptransport.ServerBefore(httptransport.PopulateRequestContext),
)
```
For AuthMiddleware to be able to pick up the Authentication header from an HTTP request we need to pass it through the context with something like ```httptransport.ServerBefore(httptransport.PopulateRequestContext)```.
================================================
FILE: auth/basic/middleware.go
================================================
package basic
import (
"bytes"
"context"
"crypto/sha256"
"crypto/subtle"
"encoding/base64"
"fmt"
"net/http"
"strings"
"github.com/go-kit/kit/endpoint"
httptransport "github.com/go-kit/kit/transport/http"
)
// AuthError represents an authorization error.
type AuthError struct {
Realm string
}
// StatusCode is an implementation of the StatusCoder interface in go-kit/http.
func (AuthError) StatusCode() int {
return http.StatusUnauthorized
}
// Error is an implementation of the Error interface.
func (AuthError) Error() string {
return http.StatusText(http.StatusUnauthorized)
}
// Headers is an implementation of the Headerer interface in go-kit/http.
func (e AuthError) Headers() http.Header {
return http.Header{
"Content-Type": []string{"text/plain; charset=utf-8"},
"X-Content-Type-Options": []string{"nosniff"},
"WWW-Authenticate": []string{fmt.Sprintf(`Basic realm=%q`, e.Realm)},
}
}
// parseBasicAuth parses an HTTP Basic Authentication string.
// "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" returns ([]byte("Aladdin"), []byte("open sesame"), true).
func parseBasicAuth(auth string) (username, password []byte, ok bool) {
const prefix = "Basic "
if !strings.HasPrefix(auth, prefix) {
return
}
c, err := base64.StdEncoding.DecodeString(auth[len(prefix):])
if err != nil {
return
}
s := bytes.IndexByte(c, ':')
if s < 0 {
return
}
return c[:s], c[s+1:], true
}
// Returns a hash of a given slice.
func toHashSlice(s []byte) []byte {
hash := sha256.Sum256(s)
return hash[:]
}
// AuthMiddleware returns a Basic Authentication middleware for a particular user and password.
func AuthMiddleware(requiredUser, requiredPassword, realm string) endpoint.Middleware {
requiredUserBytes := toHashSlice([]byte(requiredUser))
requiredPasswordBytes := toHashSlice([]byte(requiredPassword))
return func(next endpoint.Endpoint) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
auth, ok := ctx.Value(httptransport.ContextKeyRequestAuthorization).(string)
if !ok {
return nil, AuthError{realm}
}
givenUser, givenPassword, ok := parseBasicAuth(auth)
if !ok {
return nil, AuthError{realm}
}
givenUserBytes := toHashSlice(givenUser)
givenPasswordBytes := toHashSlice(givenPassword)
if subtle.ConstantTimeCompare(givenUserBytes, requiredUserBytes) == 0 ||
subtle.ConstantTimeCompare(givenPasswordBytes, requiredPasswordBytes) == 0 {
return nil, AuthError{realm}
}
return next(ctx, request)
}
}
}
================================================
FILE: auth/basic/middleware_test.go
================================================
package basic
import (
"context"
"encoding/base64"
"fmt"
"testing"
httptransport "github.com/go-kit/kit/transport/http"
)
func TestWithBasicAuth(t *testing.T) {
requiredUser := "test-user"
requiredPassword := "test-pass"
realm := "test realm"
type want struct {
result interface{}
err error
}
tests := []struct {
name string
authHeader interface{}
want want
}{
{"Isn't valid with nil header", nil, want{nil, AuthError{realm}}},
{"Isn't valid with non-string header", 42, want{nil, AuthError{realm}}},
{"Isn't valid without authHeader", "", want{nil, AuthError{realm}}},
{"Isn't valid for wrong user", makeAuthString("wrong-user", requiredPassword), want{nil, AuthError{realm}}},
{"Isn't valid for wrong password", makeAuthString(requiredUser, "wrong-password"), want{nil, AuthError{realm}}},
{"Is valid for correct creds", makeAuthString(requiredUser, requiredPassword), want{true, nil}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
ctx := context.WithValue(context.TODO(), httptransport.ContextKeyRequestAuthorization, tt.authHeader)
result, err := AuthMiddleware(requiredUser, requiredPassword, realm)(passedValidation)(ctx, nil)
if result != tt.want.result || err != tt.want.err {
t.Errorf("WithBasicAuth() = result: %v, err: %v, want result: %v, want error: %v", result, err, tt.want.result, tt.want.err)
}
})
}
}
func makeAuthString(user string, password string) string {
data := []byte(fmt.Sprintf("%s:%s", user, password))
return fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString(data))
}
func passedValidation(ctx context.Context, request interface{}) (response interface{}, err error) {
return true, nil
}
================================================
FILE: auth/casbin/middleware.go
================================================
package casbin
import (
"context"
"errors"
stdcasbin "github.com/casbin/casbin/v2"
"github.com/go-kit/kit/endpoint"
)
type contextKey string
const (
// CasbinModelContextKey holds the key to store the access control model
// in context, it can be a path to configuration file or a casbin/model
// Model.
CasbinModelContextKey contextKey = "CasbinModel"
// CasbinPolicyContextKey holds the key to store the access control policy
// in context, it can be a path to policy file or an implementation of
// casbin/persist Adapter interface.
CasbinPolicyContextKey contextKey = "CasbinPolicy"
// CasbinEnforcerContextKey holds the key to retrieve the active casbin
// Enforcer.
CasbinEnforcerContextKey contextKey = "CasbinEnforcer"
)
var (
// ErrModelContextMissing denotes a casbin model was not passed into
// the parsing of middleware's context.
ErrModelContextMissing = errors.New("CasbinModel is required in context")
// ErrPolicyContextMissing denotes a casbin policy was not passed into
// the parsing of middleware's context.
ErrPolicyContextMissing = errors.New("CasbinPolicy is required in context")
// ErrUnauthorized denotes the subject is not authorized to do the action
// intended on the given object, based on the context model and policy.
ErrUnauthorized = errors.New("Unauthorized Access")
)
// NewEnforcer checks whether the subject is authorized to do the specified
// action on the given object. If a valid access control model and policy
// is given, then the generated casbin Enforcer is stored in the context
// with CasbinEnforcer as the key.
func NewEnforcer(
subject string, object interface{}, action string,
) endpoint.Middleware {
return func(next endpoint.Endpoint) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (response interface{}, err error) {
casbinModel := ctx.Value(CasbinModelContextKey)
casbinPolicy := ctx.Value(CasbinPolicyContextKey)
enforcer, err := stdcasbin.NewEnforcer(casbinModel, casbinPolicy)
if err != nil {
return nil, err
}
ctx = context.WithValue(ctx, CasbinEnforcerContextKey, enforcer)
ok, err := enforcer.Enforce(subject, object, action)
if err != nil {
return nil, err
}
if !ok {
return nil, ErrUnauthorized
}
return next(ctx, request)
}
}
}
================================================
FILE: auth/casbin/middleware_test.go
================================================
package casbin
import (
"context"
"testing"
stdcasbin "github.com/casbin/casbin/v2"
"github.com/casbin/casbin/v2/model"
fileadapter "github.com/casbin/casbin/v2/persist/file-adapter"
)
func TestStructBaseContext(t *testing.T) {
e := func(ctx context.Context, i interface{}) (interface{}, error) { return ctx, nil }
m := model.NewModel()
m.AddDef("r", "r", "sub, obj, act")
m.AddDef("p", "p", "sub, obj, act")
m.AddDef("e", "e", "some(where (p.eft == allow))")
m.AddDef("m", "m", "r.sub == p.sub && keyMatch(r.obj, p.obj) && regexMatch(r.act, p.act)")
a := fileadapter.NewAdapter("testdata/keymatch_policy.csv")
ctx := context.WithValue(context.Background(), CasbinModelContextKey, m)
ctx = context.WithValue(ctx, CasbinPolicyContextKey, a)
// positive case
middleware := NewEnforcer("alice", "/alice_data/resource1", "GET")(e)
ctx1, err := middleware(ctx, struct{}{})
if err != nil {
t.Fatalf("Enforcer returned error: %s", err)
}
_, ok := ctx1.(context.Context).Value(CasbinEnforcerContextKey).(*stdcasbin.Enforcer)
if !ok {
t.Fatalf("context should contains the active enforcer")
}
// negative case
middleware = NewEnforcer("alice", "/alice_data/resource2", "POST")(e)
_, err = middleware(ctx, struct{}{})
if err == nil {
t.Fatalf("Enforcer should return error")
}
}
func TestFileBaseContext(t *testing.T) {
e := func(ctx context.Context, i interface{}) (interface{}, error) { return ctx, nil }
ctx := context.WithValue(context.Background(), CasbinModelContextKey, "testdata/basic_model.conf")
ctx = context.WithValue(ctx, CasbinPolicyContextKey, "testdata/basic_policy.csv")
// positive case
middleware := NewEnforcer("alice", "data1", "read")(e)
_, err := middleware(ctx, struct{}{})
if err != nil {
t.Fatalf("Enforcer returned error: %s", err)
}
}
================================================
FILE: auth/casbin/testdata/basic_model.conf
================================================
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = r.sub == p.sub && r.obj == p.obj && r.act == p.act
================================================
FILE: auth/casbin/testdata/basic_policy.csv
================================================
p, alice, data1, read
p, bob, data2, write
================================================
FILE: auth/casbin/testdata/keymatch_policy.csv
================================================
p, alice, /alice_data/*, GET
p, alice, /alice_data/resource1, POST
p, bob, /alice_data/resource2, GET
p, bob, /bob_data/*, POST
p, cathy, /cathy_data, (GET)|(POST)
================================================
FILE: auth/jwt/README.md
================================================
# package auth/jwt
`package auth/jwt` provides a set of interfaces for service authorization
through [JSON Web Tokens](https://jwt.io/).
## Usage
NewParser takes a key function and an expected signing method and returns an
`endpoint.Middleware`. The middleware will parse a token passed into the
context via the `jwt.JWTContextKey`. If the token is valid, any claims
will be added to the context via the `jwt.JWTClaimsContextKey`.
```go
import (
stdjwt "github.com/golang-jwt/jwt/v4"
"github.com/go-kit/kit/auth/jwt"
"github.com/go-kit/kit/endpoint"
)
func main() {
var exampleEndpoint endpoint.Endpoint
{
kf := func(token *stdjwt.Token) (interface{}, error) { return []byte("SigningString"), nil }
exampleEndpoint = MakeExampleEndpoint(service)
exampleEndpoint = jwt.NewParser(kf, stdjwt.SigningMethodHS256, jwt.StandardClaimsFactory)(exampleEndpoint)
}
}
```
NewSigner takes a JWT key ID header, the signing key, signing method, and a
claims object. It returns an `endpoint.Middleware`. The middleware will build
the token string and add it to the context via the `jwt.JWTContextKey`.
```go
import (
stdjwt "github.com/golang-jwt/jwt/v4"
"github.com/go-kit/kit/auth/jwt"
"github.com/go-kit/kit/endpoint"
)
func main() {
var exampleEndpoint endpoint.Endpoint
{
exampleEndpoint = grpctransport.NewClient(...).Endpoint()
exampleEndpoint = jwt.NewSigner(
"kid-header",
[]byte("SigningString"),
stdjwt.SigningMethodHS256,
jwt.Claims{},
)(exampleEndpoint)
}
}
```
In order for the parser and the signer to work, the authorization headers need
to be passed between the request and the context. `HTTPToContext()`,
`ContextToHTTP()`, `GRPCToContext()`, and `ContextToGRPC()` are given as
helpers to do this. These functions implement the correlating transport's
RequestFunc interface and can be passed as ClientBefore or ServerBefore
options.
Example of use in a client:
```go
import (
stdjwt "github.com/golang-jwt/jwt/v4"
grpctransport "github.com/go-kit/kit/transport/grpc"
"github.com/go-kit/kit/auth/jwt"
"github.com/go-kit/kit/endpoint"
)
func main() {
options := []httptransport.ClientOption{}
var exampleEndpoint endpoint.Endpoint
{
exampleEndpoint = grpctransport.NewClient(..., grpctransport.ClientBefore(jwt.ContextToGRPC())).Endpoint()
exampleEndpoint = jwt.NewSigner(
"kid-header",
[]byte("SigningString"),
stdjwt.SigningMethodHS256,
jwt.Claims{},
)(exampleEndpoint)
}
}
```
Example of use in a server:
```go
import (
"context"
"github.com/go-kit/kit/auth/jwt"
"github.com/go-kit/log"
grpctransport "github.com/go-kit/kit/transport/grpc"
)
func MakeGRPCServer(ctx context.Context, endpoints Endpoints, logger log.Logger) pb.ExampleServer {
options := []grpctransport.ServerOption{grpctransport.ServerErrorLogger(logger)}
return &grpcServer{
createUser: grpctransport.NewServer(
ctx,
endpoints.CreateUserEndpoint,
DecodeGRPCCreateUserRequest,
EncodeGRPCCreateUserResponse,
append(options, grpctransport.ServerBefore(jwt.GRPCToContext()))...,
),
getUser: grpctransport.NewServer(
ctx,
endpoints.GetUserEndpoint,
DecodeGRPCGetUserRequest,
EncodeGRPCGetUserResponse,
options...,
),
}
}
```
================================================
FILE: auth/jwt/middleware.go
================================================
package jwt
import (
"context"
"errors"
"github.com/go-kit/kit/endpoint"
"github.com/golang-jwt/jwt/v4"
)
type contextKey string
const (
// JWTContextKey holds the key used to store a JWT in the context.
JWTContextKey contextKey = "JWTToken"
// JWTTokenContextKey is an alias for JWTContextKey.
//
// Deprecated: prefer JWTContextKey.
JWTTokenContextKey = JWTContextKey
// JWTClaimsContextKey holds the key used to store the JWT Claims in the
// context.
JWTClaimsContextKey contextKey = "JWTClaims"
)
var (
// ErrTokenContextMissing denotes a token was not passed into the parsing
// middleware's context.
ErrTokenContextMissing = errors.New("token up for parsing was not passed through the context")
// ErrTokenInvalid denotes a token was not able to be validated.
ErrTokenInvalid = errors.New("JWT was invalid")
// ErrTokenExpired denotes a token's expire header (exp) has since passed.
ErrTokenExpired = errors.New("JWT is expired")
// ErrTokenMalformed denotes a token was not formatted as a JWT.
ErrTokenMalformed = errors.New("JWT is malformed")
// ErrTokenNotActive denotes a token's not before header (nbf) is in the
// future.
ErrTokenNotActive = errors.New("token is not valid yet")
// ErrUnexpectedSigningMethod denotes a token was signed with an unexpected
// signing method.
ErrUnexpectedSigningMethod = errors.New("unexpected signing method")
)
// NewSigner creates a new JWT generating middleware, specifying key ID,
// signing string, signing method and the claims you would like it to contain.
// Tokens are signed with a Key ID header (kid) which is useful for determining
// the key to use for parsing. Particularly useful for clients.
func NewSigner(kid string, key []byte, method jwt.SigningMethod, claims jwt.Claims) endpoint.Middleware {
return func(next endpoint.Endpoint) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (response interface{}, err error) {
token := jwt.NewWithClaims(method, claims)
token.Header["kid"] = kid
// Sign and get the complete encoded token as a string using the secret
tokenString, err := token.SignedString(key)
if err != nil {
return nil, err
}
ctx = context.WithValue(ctx, JWTContextKey, tokenString)
return next(ctx, request)
}
}
}
// ClaimsFactory is a factory for jwt.Claims.
// Useful in NewParser middleware.
type ClaimsFactory func() jwt.Claims
// MapClaimsFactory is a ClaimsFactory that returns
// an empty jwt.MapClaims.
func MapClaimsFactory() jwt.Claims {
return jwt.MapClaims{}
}
// StandardClaimsFactory is a ClaimsFactory that returns
// an empty jwt.StandardClaims.
func StandardClaimsFactory() jwt.Claims {
return &jwt.StandardClaims{}
}
// NewParser creates a new JWT parsing middleware, specifying a
// jwt.Keyfunc interface, the signing method and the claims type to be used. NewParser
// adds the resulting claims to endpoint context or returns error on invalid token.
// Particularly useful for servers.
func NewParser(keyFunc jwt.Keyfunc, method jwt.SigningMethod, newClaims ClaimsFactory) endpoint.Middleware {
return func(next endpoint.Endpoint) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (response interface{}, err error) {
// tokenString is stored in the context from the transport handlers.
tokenString, ok := ctx.Value(JWTContextKey).(string)
if !ok {
return nil, ErrTokenContextMissing
}
// Parse takes the token string and a function for looking up the
// key. The latter is especially useful if you use multiple keys
// for your application. The standard is to use 'kid' in the head
// of the token to identify which key to use, but the parsed token
// (head and claims) is provided to the callback, providing
// flexibility.
token, err := jwt.ParseWithClaims(tokenString, newClaims(), func(token *jwt.Token) (interface{}, error) {
// Don't forget to validate the alg is what you expect:
if token.Method != method {
return nil, ErrUnexpectedSigningMethod
}
return keyFunc(token)
})
if err != nil {
if e, ok := err.(*jwt.ValidationError); ok {
switch {
case e.Errors&jwt.ValidationErrorMalformed != 0:
// Token is malformed
return nil, ErrTokenMalformed
case e.Errors&jwt.ValidationErrorExpired != 0:
// Token is expired
return nil, ErrTokenExpired
case e.Errors&jwt.ValidationErrorNotValidYet != 0:
// Token is not active yet
return nil, ErrTokenNotActive
case e.Inner != nil:
// report e.Inner
return nil, e.Inner
}
// We have a ValidationError but have no specific Go kit error for it.
// Fall through to return original error.
}
return nil, err
}
if !token.Valid {
return nil, ErrTokenInvalid
}
ctx = context.WithValue(ctx, JWTClaimsContextKey, token.Claims)
return next(ctx, request)
}
}
}
================================================
FILE: auth/jwt/middleware_test.go
================================================
package jwt
import (
"context"
"sync"
"testing"
"time"
"crypto/subtle"
"github.com/go-kit/kit/endpoint"
"github.com/golang-jwt/jwt/v4"
)
type customClaims struct {
MyProperty string `json:"my_property"`
jwt.StandardClaims
}
func (c customClaims) VerifyMyProperty(p string) bool {
return subtle.ConstantTimeCompare([]byte(c.MyProperty), []byte(p)) != 0
}
var (
kid = "kid"
key = []byte("test_signing_key")
myProperty = "some value"
method = jwt.SigningMethodHS256
invalidMethod = jwt.SigningMethodRS256
mapClaims = jwt.MapClaims{"user": "go-kit"}
standardClaims = jwt.StandardClaims{Audience: "go-kit"}
myCustomClaims = customClaims{MyProperty: myProperty, StandardClaims: standardClaims}
// Signed tokens generated at https://jwt.io/
signedKey = "eyJhbGciOiJIUzI1NiIsImtpZCI6ImtpZCIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiZ28ta2l0In0.14M2VmYyApdSlV_LZ88ajjwuaLeIFplB8JpyNy0A19E"
standardSignedKey = "eyJhbGciOiJIUzI1NiIsImtpZCI6ImtpZCIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJnby1raXQifQ.L5ypIJjCOOv3jJ8G5SelaHvR04UJuxmcBN5QW3m_aoY"
customSignedKey = "eyJhbGciOiJIUzI1NiIsImtpZCI6ImtpZCIsInR5cCI6IkpXVCJ9.eyJteV9wcm9wZXJ0eSI6InNvbWUgdmFsdWUiLCJhdWQiOiJnby1raXQifQ.s8F-IDrV4WPJUsqr7qfDi-3GRlcKR0SRnkTeUT_U-i0"
invalidKey = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.e30.vKVCKto-Wn6rgz3vBdaZaCBGfCBDTXOENSo_X2Gq7qA"
malformedKey = "malformed.jwt.token"
)
func signingValidator(t *testing.T, signer endpoint.Endpoint, expectedKey string) {
ctx, err := signer(context.Background(), struct{}{})
if err != nil {
t.Fatalf("Signer returned error: %s", err)
}
token, ok := ctx.(context.Context).Value(JWTContextKey).(string)
if !ok {
t.Fatal("Token did not exist in context")
}
if token != expectedKey {
t.Fatalf("JWTs did not match: expecting %s got %s", expectedKey, token)
}
}
func TestNewSigner(t *testing.T) {
e := func(ctx context.Context, i interface{}) (interface{}, error) { return ctx, nil }
signer := NewSigner(kid, key, method, mapClaims)(e)
signingValidator(t, signer, signedKey)
signer = NewSigner(kid, key, method, standardClaims)(e)
signingValidator(t, signer, standardSignedKey)
signer = NewSigner(kid, key, method, myCustomClaims)(e)
signingValidator(t, signer, customSignedKey)
}
func TestJWTParser(t *testing.T) {
e := func(ctx context.Context, i interface{}) (interface{}, error) { return ctx, nil }
keys := func(token *jwt.Token) (interface{}, error) {
return key, nil
}
parser := NewParser(keys, method, MapClaimsFactory)(e)
// No Token is passed into the parser
_, err := parser(context.Background(), struct{}{})
if err == nil {
t.Error("Parser should have returned an error")
}
if err != ErrTokenContextMissing {
t.Errorf("unexpected error returned, expected: %s got: %s", ErrTokenContextMissing, err)
}
// Invalid Token is passed into the parser
ctx := context.WithValue(context.Background(), JWTContextKey, invalidKey)
_, err = parser(ctx, struct{}{})
if err == nil {
t.Error("Parser should have returned an error")
}
// Invalid Method is used in the parser
badParser := NewParser(keys, invalidMethod, MapClaimsFactory)(e)
ctx = context.WithValue(context.Background(), JWTContextKey, signedKey)
_, err = badParser(ctx, struct{}{})
if err == nil {
t.Error("Parser should have returned an error")
}
if err != ErrUnexpectedSigningMethod {
t.Errorf("unexpected error returned, expected: %s got: %s", ErrUnexpectedSigningMethod, err)
}
// Invalid key is used in the parser
invalidKeys := func(token *jwt.Token) (interface{}, error) {
return []byte("bad"), nil
}
badParser = NewParser(invalidKeys, method, MapClaimsFactory)(e)
ctx = context.WithValue(context.Background(), JWTContextKey, signedKey)
_, err = badParser(ctx, struct{}{})
if err == nil {
t.Error("Parser should have returned an error")
}
// Correct token is passed into the parser
ctx = context.WithValue(context.Background(), JWTContextKey, signedKey)
ctx1, err := parser(ctx, struct{}{})
if err != nil {
t.Fatalf("Parser returned error: %s", err)
}
cl, ok := ctx1.(context.Context).Value(JWTClaimsContextKey).(jwt.MapClaims)
if !ok {
t.Fatal("Claims were not passed into context correctly")
}
if cl["user"] != mapClaims["user"] {
t.Fatalf("JWT Claims.user did not match: expecting %s got %s", mapClaims["user"], cl["user"])
}
// Test for malformed token error response
parser = NewParser(keys, method, StandardClaimsFactory)(e)
ctx = context.WithValue(context.Background(), JWTContextKey, malformedKey)
ctx1, err = parser(ctx, struct{}{})
if want, have := ErrTokenMalformed, err; want != have {
t.Fatalf("Expected %+v, got %+v", want, have)
}
// Test for expired token error response
parser = NewParser(keys, method, StandardClaimsFactory)(e)
expired := jwt.NewWithClaims(method, jwt.StandardClaims{ExpiresAt: time.Now().Unix() - 100})
token, err := expired.SignedString(key)
if err != nil {
t.Fatalf("Unable to Sign Token: %+v", err)
}
ctx = context.WithValue(context.Background(), JWTContextKey, token)
ctx1, err = parser(ctx, struct{}{})
if want, have := ErrTokenExpired, err; want != have {
t.Fatalf("Expected %+v, got %+v", want, have)
}
// Test for not activated token error response
parser = NewParser(keys, method, StandardClaimsFactory)(e)
notactive := jwt.NewWithClaims(method, jwt.StandardClaims{NotBefore: time.Now().Unix() + 100})
token, err = notactive.SignedString(key)
if err != nil {
t.Fatalf("Unable to Sign Token: %+v", err)
}
ctx = context.WithValue(context.Background(), JWTContextKey, token)
ctx1, err = parser(ctx, struct{}{})
if want, have := ErrTokenNotActive, err; want != have {
t.Fatalf("Expected %+v, got %+v", want, have)
}
// test valid standard claims token
parser = NewParser(keys, method, StandardClaimsFactory)(e)
ctx = context.WithValue(context.Background(), JWTContextKey, standardSignedKey)
ctx1, err = parser(ctx, struct{}{})
if err != nil {
t.Fatalf("Parser returned error: %s", err)
}
stdCl, ok := ctx1.(context.Context).Value(JWTClaimsContextKey).(*jwt.StandardClaims)
if !ok {
t.Fatal("Claims were not passed into context correctly")
}
if !stdCl.VerifyAudience("go-kit", true) {
t.Fatalf("JWT jwt.StandardClaims.Audience did not match: expecting %s got %s", standardClaims.Audience, stdCl.Audience)
}
// test valid customized claims token
parser = NewParser(keys, method, func() jwt.Claims { return &customClaims{} })(e)
ctx = context.WithValue(context.Background(), JWTContextKey, customSignedKey)
ctx1, err = parser(ctx, struct{}{})
if err != nil {
t.Fatalf("Parser returned error: %s", err)
}
custCl, ok := ctx1.(context.Context).Value(JWTClaimsContextKey).(*customClaims)
if !ok {
t.Fatal("Claims were not passed into context correctly")
}
if !custCl.VerifyAudience("go-kit", true) {
t.Fatalf("JWT customClaims.Audience did not match: expecting %s got %s", standardClaims.Audience, custCl.Audience)
}
if !custCl.VerifyMyProperty(myProperty) {
t.Fatalf("JWT customClaims.MyProperty did not match: expecting %s got %s", myProperty, custCl.MyProperty)
}
}
func TestIssue562(t *testing.T) {
var (
kf = func(token *jwt.Token) (interface{}, error) { return []byte("secret"), nil }
e = NewParser(kf, jwt.SigningMethodHS256, MapClaimsFactory)(endpoint.Nop)
key = JWTContextKey
val = "eyJhbGciOiJIUzI1NiIsImtpZCI6ImtpZCIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiZ28ta2l0In0.14M2VmYyApdSlV_LZ88ajjwuaLeIFplB8JpyNy0A19E"
ctx = context.WithValue(context.Background(), key, val)
)
wg := sync.WaitGroup{}
for i := 0; i < 100; i++ {
wg.Add(1)
go func() {
defer wg.Done()
e(ctx, struct{}{}) // fatal error: concurrent map read and map write
}()
}
wg.Wait()
}
================================================
FILE: auth/jwt/transport.go
================================================
package jwt
import (
"context"
"fmt"
stdhttp "net/http"
"strings"
"google.golang.org/grpc/metadata"
"github.com/go-kit/kit/transport/grpc"
"github.com/go-kit/kit/transport/http"
)
const (
bearer string = "bearer"
bearerFormat string = "Bearer %s"
)
// HTTPToContext moves a JWT from request header to context. Particularly
// useful for servers.
func HTTPToContext() http.RequestFunc {
return func(ctx context.Context, r *stdhttp.Request) context.Context {
token, ok := extractTokenFromAuthHeader(r.Header.Get("Authorization"))
if !ok {
return ctx
}
return context.WithValue(ctx, JWTContextKey, token)
}
}
// ContextToHTTP moves a JWT from context to request header. Particularly
// useful for clients.
func ContextToHTTP() http.RequestFunc {
return func(ctx context.Context, r *stdhttp.Request) context.Context {
token, ok := ctx.Value(JWTContextKey).(string)
if ok {
r.Header.Add("Authorization", generateAuthHeaderFromToken(token))
}
return ctx
}
}
// GRPCToContext moves a JWT from grpc metadata to context. Particularly
// userful for servers.
func GRPCToContext() grpc.ServerRequestFunc {
return func(ctx context.Context, md metadata.MD) context.Context {
// capital "Key" is illegal in HTTP/2.
authHeader, ok := md["authorization"]
if !ok {
return ctx
}
token, ok := extractTokenFromAuthHeader(authHeader[0])
if ok {
ctx = context.WithValue(ctx, JWTContextKey, token)
}
return ctx
}
}
// ContextToGRPC moves a JWT from context to grpc metadata. Particularly
// useful for clients.
func ContextToGRPC() grpc.ClientRequestFunc {
return func(ctx context.Context, md *metadata.MD) context.Context {
token, ok := ctx.Value(JWTContextKey).(string)
if ok {
// capital "Key" is illegal in HTTP/2.
(*md)["authorization"] = []string{generateAuthHeaderFromToken(token)}
}
return ctx
}
}
func extractTokenFromAuthHeader(val string) (token string, ok bool) {
authHeaderParts := strings.Split(val, " ")
if len(authHeaderParts) != 2 || !strings.EqualFold(authHeaderParts[0], bearer) {
return "", false
}
return authHeaderParts[1], true
}
func generateAuthHeaderFromToken(token string) string {
return fmt.Sprintf(bearerFormat, token)
}
================================================
FILE: auth/jwt/transport_test.go
================================================
package jwt
import (
"context"
"fmt"
"net/http"
"testing"
"google.golang.org/grpc/metadata"
)
func TestHTTPToContext(t *testing.T) {
reqFunc := HTTPToContext()
// When the header doesn't exist
ctx := reqFunc(context.Background(), &http.Request{})
if ctx.Value(JWTContextKey) != nil {
t.Error("Context shouldn't contain the encoded JWT")
}
// Authorization header value has invalid format
header := http.Header{}
header.Set("Authorization", "no expected auth header format value")
ctx = reqFunc(context.Background(), &http.Request{Header: header})
if ctx.Value(JWTContextKey) != nil {
t.Error("Context shouldn't contain the encoded JWT")
}
// Authorization header is correct
header.Set("Authorization", generateAuthHeaderFromToken(signedKey))
ctx = reqFunc(context.Background(), &http.Request{Header: header})
token := ctx.Value(JWTContextKey).(string)
if token != signedKey {
t.Errorf("Context doesn't contain the expected encoded token value; expected: %s, got: %s", signedKey, token)
}
}
func TestContextToHTTP(t *testing.T) {
reqFunc := ContextToHTTP()
// No JWT is passed in the context
ctx := context.Background()
r := http.Request{}
reqFunc(ctx, &r)
token := r.Header.Get("Authorization")
if token != "" {
t.Error("authorization key should not exist in metadata")
}
// Correct JWT is passed in the context
ctx = context.WithValue(context.Background(), JWTContextKey, signedKey)
r = http.Request{Header: http.Header{}}
reqFunc(ctx, &r)
token = r.Header.Get("Authorization")
expected := generateAuthHeaderFromToken(signedKey)
if token != expected {
t.Errorf("Authorization header does not contain the expected JWT; expected %s, got %s", expected, token)
}
}
func TestGRPCToContext(t *testing.T) {
md := metadata.MD{}
reqFunc := GRPCToContext()
// No Authorization header is passed
ctx := reqFunc(context.Background(), md)
token := ctx.Value(JWTContextKey)
if token != nil {
t.Error("Context should not contain a JWT")
}
// Invalid Authorization header is passed
md["authorization"] = []string{signedKey}
ctx = reqFunc(context.Background(), md)
token = ctx.Value(JWTContextKey)
if token != nil {
t.Error("Context should not contain a JWT")
}
// Authorization header is correct
md["authorization"] = []string{fmt.Sprintf("Bearer %s", signedKey)}
ctx = reqFunc(context.Background(), md)
token, ok := ctx.Value(JWTContextKey).(string)
if !ok {
t.Fatal("JWT not passed to context correctly")
}
if token != signedKey {
t.Errorf("JWTs did not match: expecting %s got %s", signedKey, token)
}
}
func TestContextToGRPC(t *testing.T) {
reqFunc := ContextToGRPC()
// No JWT is passed in the context
ctx := context.Background()
md := metadata.MD{}
reqFunc(ctx, &md)
_, ok := md["authorization"]
if ok {
t.Error("authorization key should not exist in metadata")
}
// Correct JWT is passed in the context
ctx = context.WithValue(context.Background(), JWTContextKey, signedKey)
md = metadata.MD{}
reqFunc(ctx, &md)
token, ok := md["authorization"]
if !ok {
t.Fatal("JWT not passed to metadata correctly")
}
if token[0] != generateAuthHeaderFromToken(signedKey) {
t.Errorf("JWTs did not match: expecting %s got %s", signedKey, token[0])
}
}
================================================
FILE: circuitbreaker/doc.go
================================================
// Package circuitbreaker implements the circuit breaker pattern.
//
// Circuit breakers prevent thundering herds, and improve resiliency against
// intermittent errors. Every client-side endpoint should be wrapped in a
// circuit breaker.
//
// We provide several implementations in this package, but if you're looking
// for guidance, Gobreaker is probably the best place to start. It has a
// simple and intuitive API, and is well-tested.
package circuitbreaker
================================================
FILE: circuitbreaker/gobreaker.go
================================================
package circuitbreaker
import (
"context"
"github.com/sony/gobreaker"
"github.com/go-kit/kit/endpoint"
)
// Gobreaker returns an endpoint.Middleware that implements the circuit
// breaker pattern using the sony/gobreaker package. Only errors returned by
// the wrapped endpoint count against the circuit breaker's error count.
//
// See http://godoc.org/github.com/sony/gobreaker for more information.
func Gobreaker(cb *gobreaker.CircuitBreaker) endpoint.Middleware {
return func(next endpoint.Endpoint) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
return cb.Execute(func() (interface{}, error) { return next(ctx, request) })
}
}
}
================================================
FILE: circuitbreaker/gobreaker_test.go
================================================
package circuitbreaker_test
import (
"testing"
"github.com/sony/gobreaker"
"github.com/go-kit/kit/circuitbreaker"
)
func TestGobreaker(t *testing.T) {
var (
breaker = circuitbreaker.Gobreaker(gobreaker.NewCircuitBreaker(gobreaker.Settings{}))
primeWith = 100
shouldPass = func(n int) bool { return n <= 5 } // https://github.com/sony/gobreaker/blob/bfa846d/gobreaker.go#L76
circuitOpenError = "circuit breaker is open"
)
testFailingEndpoint(t, breaker, primeWith, shouldPass, 0, circuitOpenError)
}
================================================
FILE: circuitbreaker/handy_breaker.go
================================================
package circuitbreaker
import (
"context"
"time"
"github.com/streadway/handy/breaker"
"github.com/go-kit/kit/endpoint"
)
// HandyBreaker returns an endpoint.Middleware that implements the circuit
// breaker pattern using the streadway/handy/breaker package. Only errors
// returned by the wrapped endpoint count against the circuit breaker's error
// count.
//
// See http://godoc.org/github.com/streadway/handy/breaker for more
// information.
func HandyBreaker(cb breaker.Breaker) endpoint.Middleware {
return func(next endpoint.Endpoint) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (response interface{}, err error) {
if !cb.Allow() {
return nil, breaker.ErrCircuitOpen
}
defer func(begin time.Time) {
if err == nil {
cb.Success(time.Since(begin))
} else {
cb.Failure(time.Since(begin))
}
}(time.Now())
response, err = next(ctx, request)
return
}
}
}
================================================
FILE: circuitbreaker/handy_breaker_test.go
================================================
package circuitbreaker_test
import (
"testing"
handybreaker "github.com/streadway/handy/breaker"
"github.com/go-kit/kit/circuitbreaker"
)
func TestHandyBreaker(t *testing.T) {
var (
failureRatio = 0.05
breaker = circuitbreaker.HandyBreaker(handybreaker.NewBreaker(failureRatio))
primeWith = handybreaker.DefaultMinObservations * 10
shouldPass = func(n int) bool { return (float64(n) / float64(primeWith+n)) <= failureRatio }
openCircuitError = handybreaker.ErrCircuitOpen.Error()
)
testFailingEndpoint(t, breaker, primeWith, shouldPass, 0, openCircuitError)
}
================================================
FILE: circuitbreaker/hystrix.go
================================================
package circuitbreaker
import (
"context"
"github.com/afex/hystrix-go/hystrix"
"github.com/go-kit/kit/endpoint"
)
// Hystrix returns an endpoint.Middleware that implements the circuit
// breaker pattern using the afex/hystrix-go package.
//
// When using this circuit breaker, please configure your commands separately.
//
// See https://godoc.org/github.com/afex/hystrix-go/hystrix for more
// information.
func Hystrix(commandName string) endpoint.Middleware {
return func(next endpoint.Endpoint) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (response interface{}, err error) {
var resp interface{}
if err := hystrix.Do(commandName, func() (err error) {
resp, err = next(ctx, request)
return err
}, nil); err != nil {
return nil, err
}
return resp, nil
}
}
}
================================================
FILE: circuitbreaker/hystrix_test.go
================================================
package circuitbreaker_test
import (
"io/ioutil"
stdlog "log"
"testing"
"time"
"github.com/afex/hystrix-go/hystrix"
"github.com/go-kit/kit/circuitbreaker"
)
func TestHystrix(t *testing.T) {
stdlog.SetOutput(ioutil.Discard)
const (
commandName = "my-endpoint"
errorPercent = 5
maxConcurrent = 1000
)
hystrix.ConfigureCommand(commandName, hystrix.CommandConfig{
ErrorPercentThreshold: errorPercent,
MaxConcurrentRequests: maxConcurrent,
})
var (
breaker = circuitbreaker.Hystrix(commandName)
primeWith = hystrix.DefaultVolumeThreshold * 2
shouldPass = func(n int) bool { return (float64(n) / float64(primeWith+n)) <= (float64(errorPercent-1) / 100.0) }
openCircuitError = hystrix.ErrCircuitOpen.Error()
)
// hystrix-go uses buffered channels to receive reports on request success/failure,
// and so is basically impossible to test deterministically. We have to make sure
// the report buffer is emptied, by injecting a sleep between each invocation.
requestDelay := 5 * time.Millisecond
testFailingEndpoint(t, breaker, primeWith, shouldPass, requestDelay, openCircuitError)
}
================================================
FILE: circuitbreaker/util_test.go
================================================
package circuitbreaker_test
import (
"context"
"errors"
"fmt"
"path/filepath"
"runtime"
"testing"
"time"
"github.com/go-kit/kit/endpoint"
)
func testFailingEndpoint(
t *testing.T,
breaker endpoint.Middleware,
primeWith int,
shouldPass func(int) bool,
requestDelay time.Duration,
openCircuitError string,
) {
_, file, line, _ := runtime.Caller(1)
caller := fmt.Sprintf("%s:%d", filepath.Base(file), line)
// Create a mock endpoint and wrap it with the breaker.
m := mock{}
var e endpoint.Endpoint
e = m.endpoint
e = breaker(e)
// Prime the endpoint with successful requests.
for i := 0; i < primeWith; i++ {
if _, err := e(context.Background(), struct{}{}); err != nil {
t.Fatalf("%s: during priming, got error: %v", caller, err)
}
time.Sleep(requestDelay)
}
// Switch the endpoint to start throwing errors.
m.err = errors.New("tragedy+disaster")
m.through = 0
// The first several should be allowed through and yield our error.
for i := 0; shouldPass(i); i++ {
if _, err := e(context.Background(), struct{}{}); err != m.err {
t.Fatalf("%s: want %v, have %v", caller, m.err, err)
}
time.Sleep(requestDelay)
}
through := m.through
// But the rest should be blocked by an open circuit.
for i := 0; i < 10; i++ {
if _, err := e(context.Background(), struct{}{}); err.Error() != openCircuitError {
t.Fatalf("%s: want %q, have %q", caller, openCircuitError, err.Error())
}
time.Sleep(requestDelay)
}
// Make sure none of those got through.
if want, have := through, m.through; want != have {
t.Errorf("%s: want %d, have %d", caller, want, have)
}
}
type mock struct {
through int
err error
}
func (m *mock) endpoint(context.Context, interface{}) (interface{}, error) {
m.through++
return struct{}{}, m.err
}
================================================
FILE: codecov.yml
================================================
comment: false
================================================
FILE: docker-compose-integration.yml
================================================
version: '2'
services:
etcd:
image: gcr.io/etcd-development/etcd:v3.5.0
ports:
- "2379:2379"
environment:
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
consul:
image: consul:1.7
ports:
- "8500:8500"
zk:
image: zookeeper:3.5
ports:
- "2181:2181"
eureka:
image: springcloud/eureka
environment:
eureka.server.responseCacheUpdateIntervalMs: 1000
ports:
- "8761:8761"
================================================
FILE: endpoint/doc.go
================================================
// Package endpoint defines an abstraction for RPCs.
//
// Endpoints are a fundamental building block for many Go kit components.
// Endpoints are implemented by servers, and called by clients.
package endpoint
================================================
FILE: endpoint/endpoint.go
================================================
package endpoint
import (
"context"
)
// Endpoint is the fundamental building block of servers and clients.
// It represents a single RPC method.
type Endpoint func(ctx context.Context, request interface{}) (response interface{}, err error)
// Nop is an endpoint that does nothing and returns a nil error.
// Useful for tests.
func Nop(context.Context, interface{}) (interface{}, error) { return struct{}{}, nil }
// Middleware is a chainable behavior modifier for endpoints.
type Middleware func(Endpoint) Endpoint
// Chain is a helper function for composing middlewares. Requests will
// traverse them in the order they're declared. That is, the first middleware
// is treated as the outermost middleware.
func Chain(outer Middleware, others ...Middleware) Middleware {
return func(next Endpoint) Endpoint {
for i := len(others) - 1; i >= 0; i-- { // reverse
next = others[i](next)
}
return outer(next)
}
}
// Failer may be implemented by Go kit response types that contain business
// logic error details. If Failed returns a non-nil error, the Go kit transport
// layer may interpret this as a business logic error, and may encode it
// differently than a regular, successful response.
//
// It's not necessary for your response types to implement Failer, but it may
// help for more sophisticated use cases. The addsvc example shows how Failer
// should be used by a complete application.
type Failer interface {
Failed() error
}
================================================
FILE: endpoint/endpoint_example_test.go
================================================
package endpoint_test
import (
"context"
"fmt"
"github.com/go-kit/kit/endpoint"
)
func ExampleChain() {
e := endpoint.Chain(
annotate("first"),
annotate("second"),
annotate("third"),
)(myEndpoint)
if _, err := e(ctx, req); err != nil {
panic(err)
}
// Output:
// first pre
// second pre
// third pre
// my endpoint!
// third post
// second post
// first post
}
var (
ctx = context.Background()
req = struct{}{}
)
func annotate(s string) endpoint.Middleware {
return func(next endpoint.Endpoint) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
fmt.Println(s, "pre")
defer fmt.Println(s, "post")
return next(ctx, request)
}
}
}
func myEndpoint(context.Context, interface{}) (interface{}, error) {
fmt.Println("my endpoint!")
return struct{}{}, nil
}
================================================
FILE: examples/README.md
================================================
# Examples
Examples have been relocated to a separate repository: https://github.com/go-kit/examples
================================================
FILE: go.mod
================================================
module github.com/go-kit/kit
go 1.17
require (
github.com/VividCortex/gohistogram v1.0.0
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/aws/aws-sdk-go v1.40.45
github.com/aws/aws-sdk-go-v2 v1.9.1
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1
github.com/casbin/casbin/v2 v2.37.0
github.com/go-kit/log v0.2.0
github.com/go-zookeeper/zk v1.0.2
github.com/golang-jwt/jwt/v4 v4.0.0
github.com/hashicorp/consul/api v1.14.0
github.com/hudl/fargo v1.4.0
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab
github.com/nats-io/nats-server/v2 v2.8.4
github.com/nats-io/nats.go v1.15.0
github.com/opentracing/opentracing-go v1.2.0
github.com/openzipkin/zipkin-go v0.2.5
github.com/performancecopilot/speed/v4 v4.0.0
github.com/prometheus/client_golang v1.11.1
github.com/rabbitmq/amqp091-go v1.2.0
github.com/sirupsen/logrus v1.8.1
github.com/sony/gobreaker v0.4.1
github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e
go.etcd.io/etcd/client/pkg/v3 v3.5.0
go.etcd.io/etcd/client/v2 v2.305.0
go.etcd.io/etcd/client/v3 v3.5.0
go.opencensus.io v0.23.0
go.uber.org/zap v1.19.1
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11
google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1
)
require (
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
github.com/armon/go-metrics v0.4.0 // indirect
github.com/aws/smithy-go v1.8.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/clbanning/mxj v1.8.4 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.2.2 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/serf v0.10.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.14.4 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/miekg/dns v1.1.43 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nats-io/jwt/v2 v2.2.1-0.20220330180145-442af02fd36a // indirect
github.com/nats-io/nkeys v0.3.0 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.30.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
go.etcd.io/etcd/api/v3 v3.5.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 // indirect
gopkg.in/gcfg.v1 v1.2.3 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)
================================================
FILE: go.sum
================================================
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM=
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE=
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q=
github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI=
github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go-v2 v1.9.1 h1:ZbovGV/qo40nrOJ4q8G33AGICzaPI45FHQWJ9650pF4=
github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1 h1:w/fPGB0t5rWwA43mux4e9ozFSH5zF1moQemlA131PWc=
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o=
github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=
github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/casbin/casbin/v2 v2.37.0 h1:/poEwPSovi4bTOcP752/CsTQiRz2xycyVKFG7GUhbDw=
github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ=
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2 h1:cZqz+yOJ/R64LcKjNQOdARott/jP7BnUQ9Ah7KaZCvw=
github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo=
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54=
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw=
github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM=
github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o=
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/consul/api v1.14.0 h1:Y64GIJ8hYTu+tuGekwO4G4ardXoiCivX9wv1iP/kihk=
github.com/hashicorp/consul/api v1.14.0/go.mod h1:bcaw5CSZ7NE9qfOfKCI1xb7ZKjzu/MyvQkCLTfqLqxQ=
github.com/hashicorp/consul/sdk v0.10.0 h1:rGLEh2AWK4K0KCMvqWAz2EYxQqgciIfMagWZ0nVe5MI=
github.com/hashicorp/consul/sdk v0.10.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v1.2.2 h1:ihRI7YFwcZdiSD7SIenIhHfQH3OuDvWerAUBZbeQS3M=
github.com/hashicorp/go-hclog v1.2.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI=
github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc=
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE=
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=
github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/hashicorp/memberlist v0.4.0 h1:k3uda5gZcltmafuFF+UFqNEl5PrH+yPZ4zkjp1f/H/8=
github.com/hashicorp/memberlist v0.4.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0=
github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
github.com/hashicorp/serf v0.10.0 h1:89qvvpfMQnz6c2y4pv7j2vUUmeT1+5TSZMexuTbtsPs=
github.com/hashicorp/serf v0.10.0/go.mod h1:bXN03oZc5xlH46k/K1qTrpXb9ERKyY1/i/N5mxvgrZw=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/hudl/fargo v1.4.0 h1:ZDDILMbB37UlAVLlWcJ2Iz1XuahZZTDZfdCKeclfq2s=
github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab h1:HqW4xhhynfjrtEiiSGcQUd6vrK23iMam1FO8rI7mwig=
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.14.4 h1:eijASRJcobkVtSt81Olfh7JX43osYLwy5krOJo6YEu4=
github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg=
github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4=
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nats-io/jwt/v2 v2.2.1-0.20220330180145-442af02fd36a h1:lem6QCvxR0Y28gth9P+wV2K/zYUUAkJ+55U8cpS0p5I=
github.com/nats-io/jwt/v2 v2.2.1-0.20220330180145-442af02fd36a/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k=
github.com/nats-io/nats-server/v2 v2.8.4 h1:0jQzze1T9mECg8YZEl8+WYUXb9JKluJfCBriPUtluB4=
github.com/nats-io/nats-server/v2 v2.8.4/go.mod h1:8zZa+Al3WsESfmgSs98Fi06dRWLH5Bnq90m5bKD/eT4=
github.com/nats-io/nats.go v1.15.0 h1:3IXNBolWrwIUf2soxh6Rla8gPzYWEZQBUBK6RV21s+o=
github.com/nats-io/nats.go v1.15.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w=
github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8=
github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak=
github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/openzipkin/zipkin-go v0.2.5 h1:UwtQQx2pyPIgWYHRg+epgdx1/HnBQTgN3/oIYEJTQzU=
github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/performancecopilot/speed/v4 v4.0.0 h1:VxEDCmdkfbQYDlcr/GC9YoN9PQ6p8ulk9xVsepYy9ZY=
github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM=
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s=
github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug=
github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/rabbitmq/amqp091-go v1.2.0 h1:1pHBxAsQh54R9eX/xo679fUEAfv3loMqi0pvRFOj2nk=
github.com/rabbitmq/amqp091-go v1.2.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ=
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e h1:mOtuXaRAbVZsxAHVdPR3IjfmN8T1h2iczJLynhLybf8=
github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/etcd/api/v3 v3.5.0 h1:GsV3S+OfZEOCNXdtNkBSR7kgLobAa/SO6tCxRa0GAYw=
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
go.etcd.io/etcd/client/pkg/v3 v3.5.0 h1:2aQv6F436YnN7I4VbI8PPYrBhu+SmrTaADcf8Mi/6PU=
go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
go.etcd.io/etcd/client/v2 v2.305.0 h1:ftQ0nOOHMcbMS3KIaDQ0g5Qcd6bhaBrQT6b89DfwLTs=
go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
go.etcd.io/etcd/client/v3 v3.5.0 h1:62Eh0XOro+rDwkrypAGDfgmNh5Joq+z+W9HZdlXMzek=
go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec=
go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38=
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f h1:hEYJvxw1lSnWIl8X9ofsYMklzaDs90JI2az5YMd4fPM=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24 h1:TyKJRhyo17yWxOMCTHKWrc5rddHORMlnZ/j57umaUd8=
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 h1:GZokNIeuVkl3aZHJchRrr13WCsols02MLUcz1U9is6M=
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM=
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 h1:ysnBoUyeL/H6RCvNRhWHjKoDEmguI+mPU+qHgK8qv/w=
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
================================================
FILE: lint
================================================
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [ ! $(command -v gometalinter) ]
then
go get github.com/alecthomas/gometalinter
gometalinter --update --install
fi
time gometalinter \
--exclude='error return value not checked.*(Close|Log|Print).*\(errcheck\)$' \
--exclude='.*_test\.go:.*error return value not checked.*\(errcheck\)$' \
--exclude='/thrift/' \
--exclude='/pb/' \
--exclude='no args in Log call \(vet\)' \
--disable=dupl \
--disable=aligncheck \
--disable=gotype \
--cyclo-over=20 \
--tests \
--concurrency=2 \
--deadline=300s \
./...
================================================
FILE: log/README.md
================================================
# package log
**Deprecation notice:** The core Go kit log packages (log, log/level, log/term, and
log/syslog) have been moved to their own repository at github.com/go-kit/log.
The corresponding packages in this directory remain for backwards compatibility.
Their types alias the types and their functions call the functions provided by
the new repository. Using either import path should be equivalent. Prefer the
new import path when practical.
______
`package log` provides a minimal interface for structured logging in services.
It may be wrapped to encode conventions, enforce type-safety, provide leveled
logging, and so on. It can be used for both typical application log events,
and log-structured data streams.
## Structured logging
Structured logging is, basically, conceding to the reality that logs are
_data_, and warrant some level of schematic rigor. Using a stricter,
key/value-oriented message format for our logs, containing contextual and
semantic information, makes it much easier to get insight into the
operational activity of the systems we build. Consequently, `package log` is
of the strong belief that "[the benefits of structured logging outweigh the
minimal effort involved](https://www.thoughtworks.com/radar/techniques/structured-logging)".
Migrating from unstructured to structured logging is probably a lot easier
than you'd expect.
```go
// Unstructured
log.Printf("HTTP server listening on %s", addr)
// Structured
logger.Log("transport", "HTTP", "addr", addr, "msg", "listening")
```
## Usage
### Typical application logging
```go
w := log.NewSyncWriter(os.Stderr)
logger := log.NewLogfmtLogger(w)
logger.Log("question", "what is the meaning of life?", "answer", 42)
// Output:
// question="what is the meaning of life?" answer=42
```
### Contextual Loggers
```go
func main() {
var logger log.Logger
logger = log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr))
logger = log.With(logger, "instance_id", 123)
logger.Log("msg", "starting")
NewWorker(log.With(logger, "component", "worker")).Run()
NewSlacker(log.With(logger, "component", "slacker")).Run()
}
// Output:
// instance_id=123 msg=starting
// instance_id=123 component=worker msg=running
// instance_id=123 component=slacker msg=running
```
### Interact with stdlib logger
Redirect stdlib logger to Go kit logger.
```go
import (
"os"
stdlog "log"
kitlog "github.com/go-kit/kit/log"
)
func main() {
logger := kitlog.NewJSONLogger(kitlog.NewSyncWriter(os.Stdout))
stdlog.SetOutput(kitlog.NewStdlibAdapter(logger))
stdlog.Print("I sure like pie")
}
// Output:
// {"msg":"I sure like pie","ts":"2016/01/01 12:34:56"}
```
Or, if, for legacy reasons, you need to pipe all of your logging through the
stdlib log package, you can redirect Go kit logger to the stdlib logger.
```go
logger := kitlog.NewLogfmtLogger(kitlog.StdlibWriter{})
logger.Log("legacy", true, "msg", "at least it's something")
// Output:
// 2016/01/01 12:34:56 legacy=true msg="at least it's something"
```
### Timestamps and callers
```go
var logger log.Logger
logger = log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr))
logger = log.With(logger, "ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller)
logger.Log("msg", "hello")
// Output:
// ts=2016-01-01T12:34:56Z caller=main.go:15 msg=hello
```
## Levels
Log levels are supported via the [level package](https://godoc.org/github.com/go-kit/kit/log/level).
## Supported output formats
- [Logfmt](https://brandur.org/logfmt) ([see also](https://blog.codeship.com/logfmt-a-log-format-thats-easy-to-read-and-write))
- JSON
## Enhancements
`package log` is centered on the one-method Logger interface.
```go
type Logger interface {
Log(keyvals ...interface{}) error
}
```
This interface, and its supporting code like is the product of much iteration
and evaluation. For more details on the evolution of the Logger interface,
see [The Hunt for a Logger Interface](http://go-talks.appspot.com/github.com/ChrisHines/talks/structured-logging/structured-logging.slide#1),
a talk by [Chris Hines](https://github.com/ChrisHines).
Also, please see
[#63](https://github.com/go-kit/kit/issues/63),
[#76](https://github.com/go-kit/kit/pull/76),
[#131](https://github.com/go-kit/kit/issues/131),
[#157](https://github.com/go-kit/kit/pull/157),
[#164](https://github.com/go-kit/kit/issues/164), and
[#252](https://github.com/go-kit/kit/pull/252)
to review historical conversations about package log and the Logger interface.
Value-add packages and suggestions,
like improvements to [the leveled logger](https://godoc.org/github.com/go-kit/kit/log/level),
are of course welcome. Good proposals should
- Be composable with [contextual loggers](https://godoc.org/github.com/go-kit/kit/log#With),
- Not break the behavior of [log.Caller](https://godoc.org/github.com/go-kit/kit/log#Caller) in any wrapped contextual loggers, and
- Be friendly to packages that accept only an unadorned log.Logger.
## Benchmarks & comparisons
There are a few Go logging benchmarks and comparisons that include Go kit's package log.
- [imkira/go-loggers-bench](https://github.com/imkira/go-loggers-bench) includes kit/log
- [uber-common/zap](https://github.com/uber-common/zap), a zero-alloc logging library, includes a comparison with kit/log
================================================
FILE: log/deprecated_levels/levels.go
================================================
// Package levels implements leveled logging on top of Go kit's log package.
//
// Deprecated: Use github.com/go-kit/log/level instead.
package levels
import "github.com/go-kit/log"
// Levels provides a leveled logging wrapper around a logger. It has five
// levels: debug, info, warning (warn), error, and critical (crit). If you
// want a different set of levels, you can create your own levels type very
// easily, and you can elide the configuration.
type Levels struct {
logger log.Logger
levelKey string
// We have a choice between storing level values in string fields or
// making a separate context for each level. When using string fields the
// Log method must combine the base context, the level data, and the
// logged keyvals; but the With method only requires updating one context.
// If we instead keep a separate context for each level the Log method
// must only append the new keyvals; but the With method would have to
// update all five contexts.
// Roughly speaking, storing multiple contexts breaks even if the ratio of
// Log/With calls is more than the number of levels. We have chosen to
// make the With method cheap and the Log method a bit more costly because
// we do not expect most applications to Log more than five times for each
// call to With.
debugValue string
infoValue string
warnValue string
errorValue string
critValue string
}
// New creates a new leveled logger, wrapping the passed logger.
func New(logger log.Logger, options ...Option) Levels {
l := Levels{
logger: logger,
levelKey: "level",
debugValue: "debug",
infoValue: "info",
warnValue: "warn",
errorValue: "error",
critValue: "crit",
}
for _, option := range options {
option(&l)
}
return l
}
// With returns a new leveled logger that includes keyvals in all log events.
func (l Levels) With(keyvals ...interface{}) Levels {
return Levels{
logger: log.With(l.logger, keyvals...),
levelKey: l.levelKey,
debugValue: l.debugValue,
infoValue: l.infoValue,
warnValue: l.warnValue,
errorValue: l.errorValue,
critValue: l.critValue,
}
}
// Debug returns a debug level logger.
func (l Levels) Debug() log.Logger {
return log.WithPrefix(l.logger, l.levelKey, l.debugValue)
}
// Info returns an info level logger.
func (l Levels) Info() log.Logger {
return log.WithPrefix(l.logger, l.levelKey, l.infoValue)
}
// Warn returns a warning level logger.
func (l Levels) Warn() log.Logger {
return log.WithPrefix(l.logger, l.levelKey, l.warnValue)
}
// Error returns an error level logger.
func (l Levels) Error() log.Logger {
return log.WithPrefix(l.logger, l.levelKey, l.errorValue)
}
// Crit returns a critical level logger.
func (l Levels) Crit() log.Logger {
return log.WithPrefix(l.logger, l.levelKey, l.critValue)
}
// Option sets a parameter for leveled loggers.
type Option func(*Levels)
// Key sets the key for the field used to indicate log level. By default,
// the key is "level".
func Key(key string) Option {
return func(l *Levels) { l.levelKey = key }
}
// DebugValue sets the value for the field used to indicate the debug log
// level. By default, the value is "debug".
func DebugValue(value string) Option {
return func(l *Levels) { l.debugValue = value }
}
// InfoValue sets the value for the field used to indicate the info log level.
// By default, the value is "info".
func InfoValue(value string) Option {
return func(l *Levels) { l.infoValue = value }
}
// WarnValue sets the value for the field used to indicate the warning log
// level. By default, the value is "warn".
func WarnValue(value string) Option {
return func(l *Levels) { l.warnValue = value }
}
// ErrorValue sets the value for the field used to indicate the error log
// level. By default, the value is "error".
func ErrorValue(value string) Option {
return func(l *Levels) { l.errorValue = value }
}
// CritValue sets the value for the field used to indicate the critical log
// level. By default, the value is "crit".
func CritValue(value string) Option {
return func(l *Levels) { l.critValue = value }
}
================================================
FILE: log/deprecated_levels/levels_test.go
================================================
package levels_test
import (
"bytes"
"os"
"testing"
levels "github.com/go-kit/kit/log/deprecated_levels"
"github.com/go-kit/log"
)
func TestDefaultLevels(t *testing.T) {
buf := bytes.Buffer{}
logger := levels.New(log.NewLogfmtLogger(&buf))
logger.Debug().Log("msg", "résumé") // of course you'd want to do this
if want, have := "level=debug msg=résumé\n", buf.String(); want != have {
t.Errorf("want %#v, have %#v", want, have)
}
buf.Reset()
logger.Info().Log("msg", "Åhus")
if want, have := "level=info msg=Åhus\n", buf.String(); want != have {
t.Errorf("want %#v, have %#v", want, have)
}
buf.Reset()
logger.Error().Log("msg", "© violation")
if want, have := "level=error msg=\"© violation\"\n", buf.String(); want != have {
t.Errorf("want %#v, have %#v", want, have)
}
buf.Reset()
logger.Crit().Log("msg", " ")
if want, have := "level=crit msg=\"\\t\"\n", buf.String(); want != have {
t.Errorf("want %#v, have %#v", want, have)
}
}
func TestModifiedLevels(t *testing.T) {
buf := bytes.Buffer{}
logger := levels.New(
log.NewJSONLogger(&buf),
levels.Key("l"),
levels.DebugValue("dbg"),
levels.InfoValue("nfo"),
levels.WarnValue("wrn"),
levels.ErrorValue("err"),
levels.CritValue("crt"),
)
logger.With("easter_island", "176°").Debug().Log("msg", "moai")
if want, have := `{"easter_island":"176°","l":"dbg","msg":"moai"}`+"\n", buf.String(); want != have {
t.Errorf("want %#v, have %#v", want, have)
}
}
func ExampleLevels() {
logger := levels.New(log.NewLogfmtLogger(os.Stdout))
logger.Debug().Log("msg", "hello")
logger.With("context", "foo").Warn().Log("err", "error")
// Output:
// level=debug msg=hello
// level=warn context=foo err=error
}
================================================
FILE: log/doc.go
================================================
// Package log provides a structured logger.
//
// Deprecated: Use github.com/go-kit/log instead.
//
// Structured logging produces logs easily consumed later by humans or
// machines. Humans might be interested in debugging errors, or tracing
// specific requests. Machines might be interested in counting interesting
// events, or aggregating information for off-line processing. In both cases,
// it is important that the log messages are structured and actionable.
// Package log is designed to encourage both of these best practices.
//
// Basic Usage
//
// The fundamental interface is Logger. Loggers create log events from
// key/value data. The Logger interface has a single method, Log, which
// accepts a sequence of alternating key/value pairs, which this package names
// keyvals.
//
// type Logger interface {
// Log(keyvals ...interface{}) error
// }
//
// Here is an example of a function using a Logger to create log events.
//
// func RunTask(task Task, logger log.Logger) string {
// logger.Log("taskID", task.ID, "event", "starting task")
// ...
// logger.Log("taskID", task.ID, "event", "task complete")
// }
//
// The keys in the above example are "taskID" and "event". The values are
// task.ID, "starting task", and "task complete". Every key is followed
// immediately by its value.
//
// Keys are usually plain strings. Values may be any type that has a sensible
// encoding in the chosen log format. With structured logging it is a good
// idea to log simple values without formatting them. This practice allows
// the chosen logger to encode values in the most appropriate way.
//
// Contextual Loggers
//
// A contextual logger stores keyvals that it includes in all log events.
// Building appropriate contextual loggers reduces repetition and aids
// consistency in the resulting log output. With, WithPrefix, and WithSuffix
// add context to a logger. We can use With to improve the RunTask example.
//
// func RunTask(task Task, logger log.Logger) string {
// logger = log.With(logger, "taskID", task.ID)
// logger.Log("event", "starting task")
// ...
// taskHelper(task.Cmd, logger)
// ...
// logger.Log("event", "task complete")
// }
//
// The improved version emits the same log events as the original for the
// first and last calls to Log. Passing the contextual logger to taskHelper
// enables each log event created by taskHelper to include the task.ID even
// though taskHelper does not have access to that value. Using contextual
// loggers this way simplifies producing log output that enables tracing the
// life cycle of individual tasks. (See the Contextual example for the full
// code of the above snippet.)
//
// Dynamic Contextual Values
//
// A Valuer function stored in a contextual logger generates a new value each
// time an event is logged. The Valuer example demonstrates how this feature
// works.
//
// Valuers provide the basis for consistently logging timestamps and source
// code location. The log package defines several valuers for that purpose.
// See Timestamp, DefaultTimestamp, DefaultTimestampUTC, Caller, and
// DefaultCaller. A common logger initialization sequence that ensures all log
// entries contain a timestamp and source location looks like this:
//
// logger := log.NewLogfmtLogger(log.NewSyncWriter(os.Stdout))
// logger = log.With(logger, "ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller)
//
// Concurrent Safety
//
// Applications with multiple goroutines want each log event written to the
// same logger to remain separate from other log events. Package log provides
// two simple solutions for concurrent safe logging.
//
// NewSyncWriter wraps an io.Writer and serializes each call to its Write
// method. Using a SyncWriter has the benefit that the smallest practical
// portion of the logging logic is performed within a mutex, but it requires
// the formatting Logger to make only one call to Write per log event.
//
// NewSyncLogger wraps any Logger and serializes each call to its Log method.
// Using a SyncLogger has the benefit that it guarantees each log event is
// handled atomically within the wrapped logger, but it typically serializes
// both the formatting and output logic. Use a SyncLogger if the formatting
// logger may perform multiple writes per log event.
//
// Error Handling
//
// This package relies on the practice of wrapping or decorating loggers with
// other loggers to provide composable pieces of functionality. It also means
// that Logger.Log must return an error because some
// implementations—especially those that output log data to an io.Writer—may
// encounter errors that cannot be handled locally. This in turn means that
// Loggers that wrap other loggers should return errors from the wrapped
// logger up the stack.
//
// Fortunately, the decorator pattern also provides a way to avoid the
// necessity to check for errors every time an application calls Logger.Log.
// An application required to panic whenever its Logger encounters
// an error could initialize its logger as follows.
//
// fmtlogger := log.NewLogfmtLogger(log.NewSyncWriter(os.Stdout))
// logger := log.LoggerFunc(func(keyvals ...interface{}) error {
// if err := fmtlogger.Log(keyvals...); err != nil {
// panic(err)
// }
// return nil
// })
package log
================================================
FILE: log/example_test.go
================================================
package log_test
import (
"math/rand"
"os"
"sync"
"time"
"github.com/go-kit/kit/log"
)
func Example_basic() {
logger := log.NewLogfmtLogger(os.Stdout)
type Task struct {
ID int
}
RunTask := func(task Task, logger log.Logger) {
logger.Log("taskID", task.ID, "event", "starting task")
logger.Log("taskID", task.ID, "event", "task complete")
}
RunTask(Task{ID: 1}, logger)
// Output:
// taskID=1 event="starting task"
// taskID=1 event="task complete"
}
func Example_contextual() {
logger := log.NewLogfmtLogger(os.Stdout)
type Task struct {
ID int
Cmd string
}
taskHelper := func(cmd string, logger log.Logger) {
// execute(cmd)
logger.Log("cmd", cmd, "dur", 42*time.Millisecond)
}
RunTask := func(task Task, logger log.Logger) {
logger = log.With(logger, "taskID", task.ID)
logger.Log("event", "starting task")
taskHelper(task.Cmd, logger)
logger.Log("event", "task complete")
}
RunTask(Task{ID: 1, Cmd: "echo Hello, world!"}, logger)
// Output:
// taskID=1 event="starting task"
// taskID=1 cmd="echo Hello, world!" dur=42ms
// taskID=1 event="task complete"
}
func Example_valuer() {
logger := log.NewLogfmtLogger(os.Stdout)
count := 0
counter := func() interface{} {
count++
return count
}
logger = log.With(logger, "count", log.Valuer(counter))
logger.Log("call", "first")
logger.Log("call", "second")
// Output:
// count=1 call=first
// count=2 call=second
}
func Example_debugInfo() {
logger := log.NewLogfmtLogger(os.Stdout)
// make time predictable for this test
baseTime := time.Date(2015, time.February, 3, 10, 0, 0, 0, time.UTC)
mockTime := func() time.Time {
baseTime = baseTime.Add(time.Second)
return baseTime
}
logger = log.With(logger, "time", log.Timestamp(mockTime), "caller", log.DefaultCaller)
logger.Log("call", "first")
logger.Log("call", "second")
// ...
logger.Log("call", "third")
// Output:
// time=2015-02-03T10:00:01Z caller=example_test.go:93 call=first
// time=2015-02-03T10:00:02Z caller=example_test.go:94 call=second
// time=2015-02-03T10:00:03Z caller=example_test.go:98 call=third
}
func Example_syncWriter() {
w := log.NewSyncWriter(os.Stdout)
logger := log.NewLogfmtLogger(w)
type Task struct {
ID int
}
var wg sync.WaitGroup
RunTask := func(task Task, logger log.Logger) {
logger.Log("taskID", task.ID, "event", "starting task")
time.Sleep(time.Duration(rand.Intn(200)) * time.Millisecond)
logger.Log("taskID", task.ID, "event", "task complete")
wg.Done()
}
wg.Add(2)
go RunTask(Task{ID: 1}, logger)
go RunTask(Task{ID: 2}, logger)
wg.Wait()
// Unordered output:
// taskID=1 event="starting task"
// taskID=2 event="starting task"
// taskID=1 event="task complete"
// taskID=2 event="task complete"
}
================================================
FILE: log/json_logger.go
================================================
package log
import (
"io"
"github.com/go-kit/log"
)
// NewJSONLogger returns a Logger that encodes keyvals to the Writer as a
// single JSON object. Each log event produces no more than one call to
// w.Write. The passed Writer must be safe for concurrent use by multiple
// goroutines if the returned Logger will be used concurrently.
func NewJSONLogger(w io.Writer) Logger {
return log.NewJSONLogger(w)
}
================================================
FILE: log/level/doc.go
================================================
// Package level implements leveled logging on top of Go kit's log package.
//
// Deprecated: Use github.com/go-kit/log/level instead.
//
// To use the level package, create a logger as per normal in your func main,
// and wrap it with level.NewFilter.
//
// var logger log.Logger
// logger = log.NewLogfmtLogger(os.Stderr)
// logger = level.NewFilter(logger, level.AllowInfo()) // <--
// logger = log.With(logger, "ts", log.DefaultTimestampUTC)
//
// Then, at the callsites, use one of the level.Debug, Info, Warn, or Error
// helper methods to emit leveled log events.
//
// logger.Log("foo", "bar") // as normal, no level
// level.Debug(logger).Log("request_id", reqID, "trace_data", trace.Get())
// if value > 100 {
// level.Error(logger).Log("value", value)
// }
//
// NewFilter allows precise control over what happens when a log event is
// emitted without a level key, or if a squelched level is used. Check the
// Option functions for details.
package level
================================================
FILE: log/level/example_test.go
================================================
package level_test
import (
"errors"
"os"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
)
func Example_basic() {
logger := log.NewLogfmtLogger(os.Stdout)
level.Debug(logger).Log("msg", "this message is at the debug level")
level.Info(logger).Log("msg", "this message is at the info level")
level.Warn(logger).Log("msg", "this message is at the warn level")
level.Error(logger).Log("msg", "this message is at the error level")
// Output:
// level=debug msg="this message is at the debug level"
// level=info msg="this message is at the info level"
// level=warn msg="this message is at the warn level"
// level=error msg="this message is at the error level"
}
func Example_filtered() {
// Set up logger with level filter.
logger := log.NewLogfmtLogger(os.Stdout)
logger = level.NewFilter(logger, level.AllowInfo())
logger = log.With(logger, "caller", log.DefaultCaller)
// Use level helpers to log at different levels.
level.Error(logger).Log("err", errors.New("bad data"))
level.Info(logger).Log("event", "data saved")
level.Debug(logger).Log("next item", 17) // filtered
// Output:
// level=error caller=example_test.go:32 err="bad data"
// level=info caller=example_test.go:33 event="data saved"
}
================================================
FILE: log/level/level.go
================================================
package level
import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
)
// Error returns a logger that includes a Key/ErrorValue pair.
func Error(logger log.Logger) log.Logger {
return level.Error(logger)
}
// Warn returns a logger that includes a Key/WarnValue pair.
func Warn(logger log.Logger) log.Logger {
return level.Warn(logger)
}
// Info returns a logger that includes a Key/InfoValue pair.
func Info(logger log.Logger) log.Logger {
return level.Info(logger)
}
// Debug returns a logger that includes a Key/DebugValue pair.
func Debug(logger log.Logger) log.Logger {
return level.Debug(logger)
}
// NewFilter wraps next and implements level filtering. See the commentary on
// the Option functions for a detailed description of how to configure levels.
// If no options are provided, all leveled log events created with Debug,
// Info, Warn or Error helper methods are squelched and non-leveled log
// events are passed to next unmodified.
func NewFilter(next log.Logger, options ...Option) log.Logger {
return level.NewFilter(next, options...)
}
// Option sets a parameter for the leveled logger.
type Option = level.Option
// AllowAll is an alias for AllowDebug.
func AllowAll() Option {
return level.AllowAll()
}
// AllowDebug allows error, warn, info and debug level log events to pass.
func AllowDebug() Option {
return level.AllowDebug()
}
// AllowInfo allows error, warn and info level log events to pass.
func AllowInfo() Option {
return level.AllowInfo()
}
// AllowWarn allows error and warn level log events to pass.
func AllowWarn() Option {
return level.AllowWarn()
}
// AllowError allows only error level log events to pass.
func AllowError() Option {
return level.AllowError()
}
// AllowNone allows no leveled log events to pass.
func AllowNone() Option {
return level.AllowNone()
}
// ErrNotAllowed sets the error to return from Log when it squelches a log
// event disallowed by the configured Allow[Level] option. By default,
// ErrNotAllowed is nil; in this case the log event is squelched with no
// error.
func ErrNotAllowed(err error) Option {
return level.ErrNotAllowed(err)
}
// SquelchNoLevel instructs Log to squelch log events with no level, so that
// they don't proceed through to the wrapped logger. If SquelchNoLevel is set
// to true and a log event is squelched in this way, the error value
// configured with ErrNoLevel is returned to the caller.
func SquelchNoLevel(squelch bool) Option {
return level.SquelchNoLevel(squelch)
}
// ErrNoLevel sets the error to return from Log when it squelches a log event
// with no level. By default, ErrNoLevel is nil; in this case the log event is
// squelched with no error.
func ErrNoLevel(err error) Option {
return level.ErrNoLevel(err)
}
// NewInjector wraps next and returns a logger that adds a Key/level pair to
// the beginning of log events that don't already contain a level. In effect,
// this gives a default level to logs without a level.
func NewInjector(next log.Logger, lvl Value) log.Logger {
return level.NewInjector(next, lvl)
}
// Value is the interface that each of the canonical level values implement.
// It contains unexported methods that prevent types from other packages from
// implementing it and guaranteeing that NewFilter can distinguish the levels
// defined in this package from all other values.
type Value = level.Value
// Key returns the unique key added to log events by the loggers in this
// package.
func Key() interface{} { return level.Key() }
// ErrorValue returns the unique value added to log events by Error.
func ErrorValue() Value { return level.ErrorValue() }
// WarnValue returns the unique value added to log events by Warn.
func WarnValue() Value { return level.WarnValue() }
// InfoValue returns the unique value added to log events by Info.
func InfoValue() Value { return level.InfoValue() }
// DebugValue returns the unique value added to log events by Debug.
func DebugValue() Value { return level.DebugValue() }
================================================
FILE: log/log.go
================================================
package log
import (
"github.com/go-kit/log"
)
// Logger is the fundamental interface for all log operations. Log creates a
// log event from keyvals, a variadic sequence of alternating keys and values.
// Implementations must be safe for concurrent use by multiple goroutines. In
// particular, any implementation of Logger that appends to keyvals or
// modifies or retains any of its elements must make a copy first.
type Logger = log.Logger
// ErrMissingValue is appended to keyvals slices with odd length to substitute
// the missing value.
var ErrMissingValue = log.ErrMissingValue
// With returns a new contextual logger with keyvals prepended to those passed
// to calls to Log. If logger is also a contextual logger created by With,
// WithPrefix, or WithSuffix, keyvals is appended to the existing context.
//
// The returned Logger replaces all value elements (odd indexes) containing a
// Valuer with their generated value for each call to its Log method.
func With(logger Logger, keyvals ...interface{}) Logger {
return log.With(logger, keyvals...)
}
// WithPrefix returns a new contextual logger with keyvals prepended to those
// passed to calls to Log. If logger is also a contextual logger created by
// With, WithPrefix, or WithSuffix, keyvals is prepended to the existing context.
//
// The returned Logger replaces all value elements (odd indexes) containing a
// Valuer with their generated value for each call to its Log method.
func WithPrefix(logger Logger, keyvals ...interface{}) Logger {
return log.WithPrefix(logger, keyvals...)
}
// WithSuffix returns a new contextual logger with keyvals appended to those
// passed to calls to Log. If logger is also a contextual logger created by
// With, WithPrefix, or WithSuffix, keyvals is appended to the existing context.
//
// The returned Logger replaces all value elements (odd indexes) containing a
// Valuer with their generated value for each call to its Log method.
func WithSuffix(logger Logger, keyvals ...interface{}) Logger {
return log.WithSuffix(logger, keyvals...)
}
// LoggerFunc is an adapter to allow use of ordinary functions as Loggers. If
// f is a function with the appropriate signature, LoggerFunc(f) is a Logger
// object that calls f.
type LoggerFunc = log.LoggerFunc
================================================
FILE: log/logfmt_logger.go
================================================
package log
import (
"io"
"github.com/go-kit/log"
)
// NewLogfmtLogger returns a logger that encodes keyvals to the Writer in
// logfmt format. Each log event produces no more than one call to w.Write.
// The passed Writer must be safe for concurrent use by multiple goroutines if
// the returned Logger will be used concurrently.
func NewLogfmtLogger(w io.Writer) Logger {
return log.NewLogfmtLogger(w)
}
================================================
FILE: log/logrus/logrus_logger.go
================================================
// Package logrus provides an adapter to the
// go-kit log.Logger interface.
package logrus
import (
"errors"
"fmt"
"github.com/go-kit/log"
"github.com/sirupsen/logrus"
)
type Logger struct {
field logrus.FieldLogger
level logrus.Level
}
type Option func(*Logger)
var errMissingValue = errors.New("(MISSING)")
// NewLogger returns a Go kit log.Logger that sends log events to a logrus.Logger.
func NewLogger(logger logrus.FieldLogger, options ...Option) log.Logger {
l := &Logger{
field: logger,
level: logrus.InfoLevel,
}
for _, optFunc := range options {
optFunc(l)
}
return l
}
// WithLevel configures a logrus logger to log at level for all events.
func WithLevel(level logrus.Level) Option {
return func(c *Logger) {
c.level = level
}
}
func (l Logger) Log(keyvals ...interface{}) error {
fields := logrus.Fields{}
for i := 0; i < len(keyvals); i += 2 {
if i+1 < len(keyvals) {
fields[fmt.Sprint(keyvals[i])] = keyvals[i+1]
} else {
fields[fmt.Sprint(keyvals[i])] = errMissingValue
}
}
switch l.level {
case logrus.InfoLevel:
l.field.WithFields(fields).Info()
case logrus.ErrorLevel:
l.field.WithFields(fields).Error()
case logrus.DebugLevel:
l.field.WithFields(fields).Debug()
case logrus.WarnLevel:
l.field.WithFields(fields).Warn()
case logrus.TraceLevel:
l.field.WithFields(fields).Trace()
default:
l.field.WithFields(fields).Print()
}
return nil
}
================================================
FILE: log/logrus/logrus_logger_test.go
================================================
package logrus_test
import (
"bytes"
"encoding/json"
"errors"
"strings"
"testing"
log "github.com/go-kit/kit/log/logrus"
"github.com/sirupsen/logrus"
)
func TestLogrusLogger(t *testing.T) {
t.Parallel()
buf := &bytes.Buffer{}
logrusLogger := logrus.New()
logrusLogger.Out = buf
logrusLogger.Formatter = &logrus.TextFormatter{TimestampFormat: "02-01-2006 15:04:05", FullTimestamp: true}
logger := log.NewLogger(logrusLogger)
if err := logger.Log("hello", "world"); err != nil {
t.Fatal(err)
}
if want, have := "hello=world\n", strings.Split(buf.String(), " ")[3]; want != have {
t.Errorf("want %#v, have %#v", want, have)
}
buf.Reset()
if err := logger.Log("a", 1, "err", errors.New("error")); err != nil {
t.Fatal(err)
}
if want, have := "a=1 err=error", strings.TrimSpace(strings.SplitAfterN(buf.String(), " ", 4)[3]); want != have {
t.Errorf("want %#v, have %#v", want, have)
}
buf.Reset()
if err := logger.Log("a", 1, "b"); err != nil {
t.Fatal(err)
}
if want, have := "a=1 b=\"(MISSING)\"", strings.TrimSpace(strings.SplitAfterN(buf.String(), " ", 4)[3]); want != have {
t.Errorf("want %#v, have %#v", want, have)
}
buf.Reset()
if err := logger.Log("my_map", mymap{0: 0}); err != nil {
t.Fatal(err)
}
if want, have := "my_map=special_behavior", strings.TrimSpace(strings.Split(buf.String(), " ")[3]); want != have {
t.Errorf("want %#v, have %#v", want, have)
}
}
type mymap map[int]int
func (m mymap) String() string { return "special_behavior" }
func TestWithLevel(t *testing.T) {
tests := []struct {
name string
level logrus.Level
expectedLevel logrus.Level
}{
{
name: "Test Debug level",
level: logrus.DebugLevel,
expectedLevel: logrus.DebugLevel,
},
{
name: "Test Error level",
level: logrus.ErrorLevel,
expectedLevel: logrus.ErrorLevel,
},
{
name: "Test Warn level",
level: logrus.WarnLevel,
expectedLevel: logrus.WarnLevel,
},
{
name: "Test Info level",
level: logrus.InfoLevel,
expectedLevel: logrus.InfoLevel,
},
{
name: "Test Trace level",
level: logrus.TraceLevel,
expectedLevel: logrus.TraceLevel,
},
{
name: "Test not existing level",
level: 999,
expectedLevel: logrus.InfoLevel,
},
}
for _, tt := range tests {
buf := &bytes.Buffer{}
logrusLogger := logrus.New()
logrusLogger.Out = buf
logrusLogger.Level = tt.level
logrusLogger.Formatter = &logrus.JSONFormatter{}
logger := log.NewLogger(logrusLogger, log.WithLevel(tt.level))
t.Run(tt.name, func(t *testing.T) {
if err := logger.Log(); err != nil {
t.Fatal(err)
}
l := map[string]interface{}{}
if err := json.Unmarshal(buf.Bytes(), &l); err != nil {
t.Fatal(err)
}
if v, ok := l["level"].(string); !ok || v != tt.expectedLevel.String() {
t.Fatalf("Logging levels doesn't match. Expected: %s, got: %s", tt.level, v)
}
})
}
}
================================================
FILE: log/nop_logger.go
================================================
package log
import "github.com/go-kit/log"
// NewNopLogger returns a logger that doesn't do anything.
func NewNopLogger() Logger {
return log.NewNopLogger()
}
================================================
FILE: log/stdlib.go
================================================
package log
import (
"io"
"github.com/go-kit/log"
)
// StdlibWriter implements io.Writer by invoking the stdlib log.Print. It's
// designed to be passed to a Go kit logger as the writer, for cases where
// it's necessary to redirect all Go kit log output to the stdlib logger.
//
// If you have any choice in the matter, you shouldn't use this. Prefer to
// redirect the stdlib log to the Go kit logger via NewStdlibAdapter.
type StdlibWriter = log.StdlibWriter
// StdlibAdapter wraps a Logger and allows it to be passed to the stdlib
// logger's SetOutput. It will extract date/timestamps, filenames, and
// messages, and place them under relevant keys.
type StdlibAdapter = log.StdlibAdapter
// StdlibAdapterOption sets a parameter for the StdlibAdapter.
type StdlibAdapterOption = log.StdlibAdapterOption
// TimestampKey sets the key for the timestamp field. By default, it's "ts".
func TimestampKey(key string) StdlibAdapterOption {
return log.TimestampKey(key)
}
// FileKey sets the key for the file and line field. By default, it's "caller".
func FileKey(key string) StdlibAdapterOption {
return log.FileKey(key)
}
// MessageKey sets the key for the actual log message. By default, it's "msg".
func MessageKey(key string) StdlibAdapterOption {
return log.MessageKey(key)
}
// Prefix configures the adapter to parse a prefix from stdlib log events. If
// you provide a non-empty prefix to the stdlib logger, then your should provide
// that same prefix to the adapter via this option.
//
// By default, the prefix isn't included in the msg key. Set joinPrefixToMsg to
// true if you want to include the parsed prefix in the msg.
func Prefix(prefix string, joinPrefixToMsg bool) StdlibAdapterOption {
return log.Prefix(prefix, joinPrefixToMsg)
}
// NewStdlibAdapter returns a new StdlibAdapter wrapper around the passed
// logger. It's designed to be passed to log.SetOutput.
func NewStdlibAdapter(logger Logger, options ...StdlibAdapterOption) io.Writer {
return log.NewStdlibAdapter(logger, options...)
}
================================================
FILE: log/sync.go
================================================
package log
import (
"io"
"github.com/go-kit/log"
)
// SwapLogger wraps another logger that may be safely replaced while other
// goroutines use the SwapLogger concurrently. The zero value for a SwapLogger
// will discard all log events without error.
//
// SwapLogger serves well as a package global logger that can be changed by
// importers.
type SwapLogger = log.SwapLogger
// NewSyncWriter returns a new writer that is safe for concurrent use by
// multiple goroutines. Writes to the returned writer are passed on to w. If
// another write is already in progress, the calling goroutine blocks until
// the writer is available.
//
// If w implements the following interface, so does the returned writer.
//
// interface {
// Fd() uintptr
// }
func NewSyncWriter(w io.Writer) io.Writer {
return log.NewSyncWriter(w)
}
// NewSyncLogger returns a logger that synchronizes concurrent use of the
// wrapped logger. When multiple goroutines use the SyncLogger concurrently
// only one goroutine will be allowed to log to the wrapped logger at a time.
// The other goroutines will block until the logger is available.
func NewSyncLogger(logger Logger) Logger {
return log.NewSyncLogger(logger)
}
================================================
FILE: log/syslog/example_test.go
================================================
// +build !windows
// +build !plan9
// +build !nacl
package syslog_test
import (
"fmt"
gosyslog "log/syslog"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/kit/log/syslog"
)
func ExampleNewSyslogLogger_defaultPrioritySelector() {
// Normal syslog writer
w, err := gosyslog.New(gosyslog.LOG_INFO, "experiment")
if err != nil {
fmt.Println(err)
return
}
// syslog logger with logfmt formatting
logger := syslog.NewSyslogLogger(w, log.NewLogfmtLogger)
logger.Log("msg", "info because of default")
logger.Log(level.Key(), level.DebugValue(), "msg", "debug because of explicit level")
}
================================================
FILE: log/syslog/syslog.go
================================================
//go:build !windows && !plan9 && !nacl
// +build !windows,!plan9,!nacl
// Deprecated: Use github.com/go-kit/log/syslog instead.
package syslog
import (
"io"
"github.com/go-kit/log"
"github.com/go-kit/log/syslog"
)
// SyslogWriter is an interface wrapping stdlib syslog Writer.
type SyslogWriter = syslog.SyslogWriter
// NewSyslogLogger returns a new Logger which writes to syslog in syslog format.
// The body of the log message is the formatted output from the Logger returned
// by newLogger.
func NewSyslogLogger(w SyslogWriter, newLogger func(io.Writer) log.Logger, options ...Option) log.Logger {
return syslog.NewSyslogLogger(w, newLogger, options...)
}
// Option sets a parameter for syslog loggers.
type Option = syslog.Option
// PrioritySelector inspects the list of keyvals and selects a syslog priority.
type PrioritySelector = syslog.PrioritySelector
// PrioritySelectorOption sets priority selector function to choose syslog
// priority.
func PrioritySelectorOption(selector PrioritySelector) Option {
return syslog.PrioritySelectorOption(selector)
}
================================================
FILE: log/term/colorlogger.go
================================================
package term
import (
"io"
"github.com/go-kit/log"
"github.com/go-kit/log/term"
)
// Color represents an ANSI color. The zero value is Default.
type Color = term.Color
// ANSI colors.
const (
Default = term.Default
Black = term.Black
DarkRed = term.DarkRed
DarkGreen = term.DarkGreen
Brown = term.Brown
DarkBlue = term.DarkBlue
DarkMagenta = term.DarkMagenta
DarkCyan = term.DarkCyan
Gray = term.Gray
DarkGray = term.DarkGray
Red = term.Red
Green = term.Green
Yellow = term.Yellow
Blue = term.Blue
Magenta = term.Magenta
Cyan = term.Cyan
White = term.White
)
// FgBgColor represents a foreground and background color.
type FgBgColor = term.FgBgColor
// NewColorLogger returns a Logger which writes colored logs to w. ANSI color
// codes for the colors returned by color are added to the formatted output
// from the Logger returned by newLogger and the combined result written to w.
func NewColorLogger(w io.Writer, newLogger func(io.Writer) log.Logger, color func(keyvals ...interface{}) FgBgColor) log.Logger {
return term.NewColorLogger(w, newLogger, color)
}
================================================
FILE: log/term/colorwriter.go
================================================
package term
import (
"io"
"github.com/go-kit/log/term"
)
// NewColorWriter returns an io.Writer that writes to w and provides cross
// platform support for ANSI color codes. If w is not a terminal it is
// returned unmodified.
func NewColorWriter(w io.Writer) io.Writer {
return term.NewColorWriter(w)
}
================================================
FILE: log/term/example_test.go
================================================
package term_test
import (
"errors"
"os"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/term"
)
func ExampleNewLogger_redErrors() {
// Color errors red
colorFn := func(keyvals ...interface{}) term.FgBgColor {
for i := 1; i < len(keyvals); i += 2 {
if _, ok := keyvals[i].(error); ok {
return term.FgBgColor{Fg: term.White, Bg: term.Red}
}
}
return term.FgBgColor{}
}
logger := term.NewLogger(os.Stdout, log.NewLogfmtLogger, colorFn)
logger.Log("msg", "default color", "err", nil)
logger.Log("msg", "colored because of error", "err", errors.New("coloring error"))
}
func ExampleNewLogger_levelColors() {
// Color by level value
colorFn := func(keyvals ...interface{}) term.FgBgColor {
for i := 0; i < len(keyvals)-1; i += 2 {
if keyvals[i] != "level" {
continue
}
switch keyvals[i+1] {
case "debug":
return term.FgBgColor{Fg: term.DarkGray}
case "info":
return term.FgBgColor{Fg: term.Gray}
case "warn":
return term.FgBgColor{Fg: term.Yellow}
case "error":
return term.FgBgColor{Fg: term.Red}
case "crit":
return term.FgBgColor{Fg: term.Gray, Bg: term.DarkRed}
default:
return term.FgBgColor{}
}
}
return term.FgBgColor{}
}
logger := term.NewLogger(os.Stdout, log.NewJSONLogger, colorFn)
logger.Log("level", "warn", "msg", "yellow")
logger.Log("level", "debug", "msg", "dark gray")
}
================================================
FILE: log/term/term.go
================================================
// Package term provides tools for logging to a terminal.
//
// Deprecated: Use github.com/go-kit/log/term instead.
package term
import (
"io"
"github.com/go-kit/log"
"github.com/go-kit/log/term"
)
// NewLogger returns a Logger that takes advantage of terminal features if
// possible. Log events are formatted by the Logger returned by newLogger. If
// w is a terminal each log event is colored according to the color function.
func NewLogger(w io.Writer, newLogger func(io.Writer) log.Logger, color func(keyvals ...interface{}) FgBgColor) log.Logger {
return term.NewLogger(w, newLogger, color)
}
// IsTerminal returns true if w writes to a terminal.
func IsTerminal(w io.Writer) bool {
return term.IsTerminal(w)
}
================================================
FILE: log/value.go
================================================
package log
import (
"time"
"github.com/go-kit/log"
)
// A Valuer generates a log value. When passed to With, WithPrefix, or
// WithSuffix in a value element (odd indexes), it represents a dynamic
// value which is re-evaluated with each log event.
type Valuer = log.Valuer
// Timestamp returns a timestamp Valuer. It invokes the t function to get the
// time; unless you are doing something tricky, pass time.Now.
//
// Most users will want to use DefaultTimestamp or DefaultTimestampUTC, which
// are TimestampFormats that use the RFC3339Nano format.
func Timestamp(t func() time.Time) Valuer {
return log.Timestamp(t)
}
// TimestampFormat returns a timestamp Valuer with a custom time format. It
// invokes the t function to get the time to format; unless you are doing
// something tricky, pass time.Now. The layout string is passed to
// Time.Format.
//
// Most users will want to use DefaultTimestamp or DefaultTimestampUTC, which
// are TimestampFormats that use the RFC3339Nano format.
func TimestampFormat(t func() time.Time, layout string) Valuer {
return log.TimestampFormat(t, layout)
}
// Caller returns a Valuer that returns a file and line from a specified depth
// in the callstack. Users will probably want to use DefaultCaller.
func Caller(depth int) Valuer {
return log.Caller(depth)
}
var (
// DefaultTimestamp is a Valuer that returns the current wallclock time,
// respecting time zones, when bound.
DefaultTimestamp = log.DefaultTimestamp
// DefaultTimestampUTC is a Valuer that returns the current time in UTC
// when bound.
DefaultTimestampUTC = log.DefaultTimestampUTC
// DefaultCaller is a Valuer that returns the file and line where the Log
// method was invoked. It can only be used with log.With.
DefaultCaller = log.DefaultCaller
)
================================================
FILE: log/zap/zap_sugar_logger.go
================================================
package zap
import (
"github.com/go-kit/log"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
type zapSugarLogger func(msg string, keysAndValues ...interface{})
func (l zapSugarLogger) Log(kv ...interface{}) error {
l("", kv...)
return nil
}
// NewZapSugarLogger returns a Go kit log.Logger that sends
// log events to a zap.Logger.
func NewZapSugarLogger(logger *zap.Logger, level zapcore.Level) log.Logger {
sugarLogger := logger.WithOptions(zap.AddCallerSkip(2)).Sugar()
var sugar zapSugarLogger
switch level {
case zapcore.DebugLevel:
sugar = sugarLogger.Debugw
case zapcore.InfoLevel:
sugar = sugarLogger.Infow
case zapcore.WarnLevel:
sugar = sugarLogger.Warnw
case zapcore.ErrorLevel:
sugar = sugarLogger.Errorw
case zapcore.DPanicLevel:
sugar = sugarLogger.DPanicw
case zapcore.PanicLevel:
sugar = sugarLogger.Panicw
case zapcore.FatalLevel:
sugar = sugarLogger.Fatalw
default:
sugar = sugarLogger.Infow
}
return sugar
}
================================================
FILE: log/zap/zap_sugar_logger_test.go
================================================
package zap_test
import (
"encoding/json"
kitzap "github.com/go-kit/kit/log/zap"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"strings"
"testing"
)
func TestZapSugarLogger(t *testing.T) {
// logger config
encoderConfig := zap.NewDevelopmentEncoderConfig()
encoder := zapcore.NewJSONEncoder(encoderConfig)
levelKey := encoderConfig.LevelKey
// basic test cases
type testCase struct {
level zapcore.Level
kvs []interface{}
want map[string]string
}
testCases := []testCase{
{level: zapcore.DebugLevel, kvs: []interface{}{"key1", "value1"},
want: map[string]string{levelKey: "DEBUG", "key1": "value1"}},
{level: zapcore.InfoLevel, kvs: []interface{}{"key2", "value2"},
want: map[string]string{levelKey: "INFO", "key2": "value2"}},
{level: zapcore.WarnLevel, kvs: []interface{}{"key3", "value3"},
want: map[string]string{levelKey: "WARN", "key3": "value3"}},
{level: zapcore.ErrorLevel, kvs: []interface{}{"key4", "value4"},
want: map[string]string{levelKey: "ERROR", "key4": "value4"}},
{level: zapcore.DPanicLevel, kvs: []interface{}{"key5", "value5"},
want: map[string]string{levelKey: "DPANIC", "key5": "value5"}},
{level: zapcore.PanicLevel, kvs: []interface{}{"key6", "value6"},
want: map[string]string{levelKey: "PANIC", "key6": "value6"}},
}
// test
for _, testCase := range testCases {
t.Run(testCase.level.String(), func(t *testing.T) {
// make logger
writer := &tbWriter{tb: t}
logger := zap.New(
zapcore.NewCore(encoder, zapcore.AddSync(writer), zap.DebugLevel),
zap.Development())
// check panic
shouldPanic := testCase.level >= zapcore.DPanicLevel
kitLogger := kitzap.NewZapSugarLogger(logger, testCase.level)
defer func() {
isPanic := recover() != nil
if shouldPanic != isPanic {
t.Errorf("test level %v should panic(%v), but %v", testCase.level, shouldPanic, isPanic)
}
// check log kvs
logMap := make(map[string]string)
err := json.Unmarshal([]byte(writer.sb.String()), &logMap)
if err != nil {
t.Errorf("unmarshal error: %v", err)
} else {
for k, v := range testCase.want {
vv, ok := logMap[k]
if !ok || v != vv {
t.Error("error log")
}
}
}
}()
kitLogger.Log(testCase.kvs...)
})
}
}
type tbWriter struct {
tb testing.TB
sb strings.Builder
}
func (w *tbWriter) Write(b []byte) (n int, err error) {
w.tb.Logf(string(b))
w.sb.Write(b)
return len(b), nil
}
================================================
FILE: metrics/README.md
================================================
# package metrics
`package metrics` provides a set of uniform interfaces for service instrumentation.
It has
[counters](http://prometheus.io/docs/concepts/metric_types/#counter),
[gauges](http://prometheus.io/docs/concepts/metric_types/#gauge), and
[histograms](http://prometheus.io/docs/concepts/metric_types/#histogram),
and provides adapters to popular metrics packages, like
[expvar](https://golang.org/pkg/expvar),
[StatsD](https://github.com/etsy/statsd), and
[Prometheus](https://prometheus.io).
## Rationale
Code instrumentation is absolutely essential to achieve
[observability](https://speakerdeck.com/mattheath/observability-in-micro-service-architectures)
into a distributed system.
Metrics and instrumentation tools have coalesced around a few well-defined idioms.
`package metrics` provides a common, minimal interface those idioms for service authors.
## Usage
A simple counter, exported via expvar.
```go
import (
"github.com/go-kit/kit/metrics"
"github.com/go-kit/kit/metrics/expvar"
)
func main() {
var myCount metrics.Counter
myCount = expvar.NewCounter("my_count")
myCount.Add(1)
}
```
A histogram for request duration,
exported via a Prometheus summary with dynamically-computed quantiles.
```go
import (
"time"
stdprometheus "github.com/prometheus/client_golang/prometheus"
"github.com/go-kit/kit/metrics"
"github.com/go-kit/kit/metrics/prometheus"
)
func main() {
var dur metrics.Histogram = prometheus.NewSummaryFrom(stdprometheus.SummaryOpts{
Namespace: "myservice",
Subsystem: "api",
Name: "request_duration_seconds",
Help: "Total time spent serving requests.",
}, []string{})
// ...
}
func handleRequest(dur metrics.Histogram) {
defer func(begin time.Time) { dur.Observe(time.Since(begin).Seconds()) }(time.Now())
// handle request
}
```
A gauge for the number of goroutines currently running, exported via StatsD.
```go
import (
"context"
"net"
"os"
"runtime"
"time"
"github.com/go-kit/kit/metrics"
"github.com/go-kit/ki
gitextract_llwttmje/
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yaml
│ │ ├── config.yml
│ │ └── feature_request.yaml
│ └── workflows/
│ ├── .editorconfig
│ └── ci.yml
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── auth/
│ ├── basic/
│ │ ├── README.md
│ │ ├── middleware.go
│ │ └── middleware_test.go
│ ├── casbin/
│ │ ├── middleware.go
│ │ ├── middleware_test.go
│ │ └── testdata/
│ │ ├── basic_model.conf
│ │ ├── basic_policy.csv
│ │ └── keymatch_policy.csv
│ └── jwt/
│ ├── README.md
│ ├── middleware.go
│ ├── middleware_test.go
│ ├── transport.go
│ └── transport_test.go
├── circuitbreaker/
│ ├── doc.go
│ ├── gobreaker.go
│ ├── gobreaker_test.go
│ ├── handy_breaker.go
│ ├── handy_breaker_test.go
│ ├── hystrix.go
│ ├── hystrix_test.go
│ └── util_test.go
├── codecov.yml
├── docker-compose-integration.yml
├── endpoint/
│ ├── doc.go
│ ├── endpoint.go
│ └── endpoint_example_test.go
├── examples/
│ └── README.md
├── go.mod
├── go.sum
├── lint
├── log/
│ ├── README.md
│ ├── deprecated_levels/
│ │ ├── levels.go
│ │ └── levels_test.go
│ ├── doc.go
│ ├── example_test.go
│ ├── json_logger.go
│ ├── level/
│ │ ├── doc.go
│ │ ├── example_test.go
│ │ └── level.go
│ ├── log.go
│ ├── logfmt_logger.go
│ ├── logrus/
│ │ ├── logrus_logger.go
│ │ └── logrus_logger_test.go
│ ├── nop_logger.go
│ ├── stdlib.go
│ ├── sync.go
│ ├── syslog/
│ │ ├── example_test.go
│ │ └── syslog.go
│ ├── term/
│ │ ├── colorlogger.go
│ │ ├── colorwriter.go
│ │ ├── example_test.go
│ │ └── term.go
│ ├── value.go
│ └── zap/
│ ├── zap_sugar_logger.go
│ └── zap_sugar_logger_test.go
├── metrics/
│ ├── README.md
│ ├── cloudwatch/
│ │ ├── cloudwatch.go
│ │ └── cloudwatch_test.go
│ ├── cloudwatch2/
│ │ ├── cloudwatch2.go
│ │ └── cloudwatch2_test.go
│ ├── discard/
│ │ └── discard.go
│ ├── doc.go
│ ├── dogstatsd/
│ │ ├── dogstatsd.go
│ │ └── dogstatsd_test.go
│ ├── expvar/
│ │ ├── expvar.go
│ │ └── expvar_test.go
│ ├── generic/
│ │ ├── generic.go
│ │ └── generic_test.go
│ ├── graphite/
│ │ ├── graphite.go
│ │ └── graphite_test.go
│ ├── influx/
│ │ ├── example_test.go
│ │ ├── influx.go
│ │ └── influx_test.go
│ ├── influxstatsd/
│ │ ├── influxstatsd.go
│ │ └── influxstatsd_test.go
│ ├── internal/
│ │ ├── convert/
│ │ │ ├── convert.go
│ │ │ └── convert_test.go
│ │ ├── lv/
│ │ │ ├── labelvalues.go
│ │ │ ├── labelvalues_test.go
│ │ │ ├── space.go
│ │ │ └── space_test.go
│ │ └── ratemap/
│ │ └── ratemap.go
│ ├── metrics.go
│ ├── multi/
│ │ ├── multi.go
│ │ └── multi_test.go
│ ├── pcp/
│ │ ├── pcp.go
│ │ └── pcp_test.go
│ ├── prometheus/
│ │ ├── prometheus.go
│ │ └── prometheus_test.go
│ ├── provider/
│ │ ├── discard.go
│ │ ├── dogstatsd.go
│ │ ├── expvar.go
│ │ ├── graphite.go
│ │ ├── influx.go
│ │ ├── prometheus.go
│ │ ├── provider.go
│ │ └── statsd.go
│ ├── statsd/
│ │ ├── statsd.go
│ │ └── statsd_test.go
│ ├── teststat/
│ │ ├── buffers.go
│ │ ├── populate.go
│ │ └── teststat.go
│ ├── timer.go
│ └── timer_test.go
├── ratelimit/
│ ├── token_bucket.go
│ └── token_bucket_test.go
├── sd/
│ ├── benchmark_test.go
│ ├── consul/
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ ├── integration_test.go
│ │ ├── registrar.go
│ │ └── registrar_test.go
│ ├── dnssrv/
│ │ ├── doc.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ └── lookup.go
│ ├── doc.go
│ ├── endpoint_cache.go
│ ├── endpoint_cache_test.go
│ ├── endpointer.go
│ ├── endpointer_test.go
│ ├── etcd/
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── example_test.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ ├── integration_test.go
│ │ ├── registrar.go
│ │ └── registrar_test.go
│ ├── etcdv3/
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── example_test.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ ├── integration_test.go
│ │ ├── registrar.go
│ │ └── registrar_test.go
│ ├── eureka/
│ │ ├── doc.go
│ │ ├── instancer.go
│ │ ├── instancer_test.go
│ │ ├── integration_test.go
│ │ ├── registrar.go
│ │ ├── registrar_test.go
│ │ └── util_test.go
│ ├── factory.go
│ ├── instancer.go
│ ├── internal/
│ │ └── instance/
│ │ ├── cache.go
│ │ └── cache_test.go
│ ├── lb/
│ │ ├── balancer.go
│ │ ├── doc.go
│ │ ├── random.go
│ │ ├── random_test.go
│ │ ├── retry.go
│ │ ├── retry_test.go
│ │ ├── round_robin.go
│ │ └── round_robin_test.go
│ ├── registrar.go
│ └── zk/
│ ├── client.go
│ ├── client_test.go
│ ├── doc.go
│ ├── instancer.go
│ ├── instancer_test.go
│ ├── integration_test.go
│ ├── logwrapper.go
│ ├── registrar.go
│ └── util_test.go
├── tracing/
│ ├── README.md
│ ├── doc.go
│ ├── opencensus/
│ │ ├── doc.go
│ │ ├── endpoint.go
│ │ ├── endpoint_options.go
│ │ ├── endpoint_test.go
│ │ ├── grpc.go
│ │ ├── grpc_test.go
│ │ ├── http.go
│ │ ├── http_test.go
│ │ ├── jsonrpc.go
│ │ ├── jsonrpc_test.go
│ │ ├── opencensus_test.go
│ │ └── tracer_options.go
│ ├── opentracing/
│ │ ├── doc.go
│ │ ├── endpoint.go
│ │ ├── endpoint_options.go
│ │ ├── endpoint_test.go
│ │ ├── grpc.go
│ │ ├── grpc_test.go
│ │ ├── http.go
│ │ └── http_test.go
│ └── zipkin/
│ ├── README.md
│ ├── doc.go
│ ├── endpoint.go
│ ├── endpoint_test.go
│ ├── grpc.go
│ ├── grpc_test.go
│ ├── http.go
│ ├── http_test.go
│ └── options.go
├── transport/
│ ├── amqp/
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── publisher.go
│ │ ├── publisher_test.go
│ │ ├── request_response_func.go
│ │ ├── subscriber.go
│ │ ├── subscriber_test.go
│ │ └── util.go
│ ├── awslambda/
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── handler.go
│ │ ├── handler_test.go
│ │ └── request_response_funcs.go
│ ├── doc.go
│ ├── error_handler.go
│ ├── error_handler_test.go
│ ├── grpc/
│ │ ├── README.md
│ │ ├── _grpc_test/
│ │ │ ├── client.go
│ │ │ ├── context_metadata.go
│ │ │ ├── pb/
│ │ │ │ ├── generate.go
│ │ │ │ ├── test.pb.go
│ │ │ │ ├── test.proto
│ │ │ │ └── test_grpc.pb.go
│ │ │ ├── request_response.go
│ │ │ ├── server.go
│ │ │ └── service.go
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── request_response_funcs.go
│ │ └── server.go
│ ├── http/
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── example_test.go
│ │ ├── intercepting_writer.go
│ │ ├── intercepting_writer_test.go
│ │ ├── jsonrpc/
│ │ │ ├── README.md
│ │ │ ├── client.go
│ │ │ ├── client_test.go
│ │ │ ├── doc.go
│ │ │ ├── encode_decode.go
│ │ │ ├── error.go
│ │ │ ├── error_test.go
│ │ │ ├── request_response_types.go
│ │ │ ├── request_response_types_test.go
│ │ │ ├── server.go
│ │ │ └── server_test.go
│ │ ├── proto/
│ │ │ ├── client.go
│ │ │ ├── generate.go
│ │ │ ├── proto_pb_test.go
│ │ │ ├── proto_test.go
│ │ │ ├── proto_test.proto
│ │ │ └── server.go
│ │ ├── request_response_funcs.go
│ │ ├── request_response_funcs_test.go
│ │ ├── server.go
│ │ └── server_test.go
│ ├── httprp/
│ │ ├── doc.go
│ │ ├── server.go
│ │ └── server_test.go
│ ├── nats/
│ │ ├── doc.go
│ │ ├── encode_decode.go
│ │ ├── publisher.go
│ │ ├── publisher_test.go
│ │ ├── request_response_funcs.go
│ │ ├── subscriber.go
│ │ └── subscriber_test.go
│ ├── netrpc/
│ │ └── README.md
│ └── thrift/
│ └── README.md
└── util/
├── README.md
└── conn/
├── doc.go
├── manager.go
└── manager_test.go
SYMBOL INDEX (1706 symbols across 228 files)
FILE: auth/basic/middleware.go
type AuthError (line 18) | type AuthError struct
method StatusCode (line 23) | func (AuthError) StatusCode() int {
method Error (line 28) | func (AuthError) Error() string {
method Headers (line 33) | func (e AuthError) Headers() http.Header {
function parseBasicAuth (line 43) | func parseBasicAuth(auth string) (username, password []byte, ok bool) {
function toHashSlice (line 61) | func toHashSlice(s []byte) []byte {
function AuthMiddleware (line 67) | func AuthMiddleware(requiredUser, requiredPassword, realm string) endpoi...
FILE: auth/basic/middleware_test.go
function TestWithBasicAuth (line 12) | func TestWithBasicAuth(t *testing.T) {
function makeAuthString (line 45) | func makeAuthString(user string, password string) string {
function passedValidation (line 50) | func passedValidation(ctx context.Context, request interface{}) (respons...
FILE: auth/casbin/middleware.go
type contextKey (line 11) | type contextKey
constant CasbinModelContextKey (line 17) | CasbinModelContextKey contextKey = "CasbinModel"
constant CasbinPolicyContextKey (line 22) | CasbinPolicyContextKey contextKey = "CasbinPolicy"
constant CasbinEnforcerContextKey (line 26) | CasbinEnforcerContextKey contextKey = "CasbinEnforcer"
function NewEnforcer (line 47) | func NewEnforcer(
FILE: auth/casbin/middleware_test.go
function TestStructBaseContext (line 12) | func TestStructBaseContext(t *testing.T) {
function TestFileBaseContext (line 45) | func TestFileBaseContext(t *testing.T) {
FILE: auth/jwt/middleware.go
type contextKey (line 11) | type contextKey
constant JWTContextKey (line 15) | JWTContextKey contextKey = "JWTToken"
constant JWTTokenContextKey (line 20) | JWTTokenContextKey = JWTContextKey
constant JWTClaimsContextKey (line 24) | JWTClaimsContextKey contextKey = "JWTClaims"
function NewSigner (line 54) | func NewSigner(kid string, key []byte, method jwt.SigningMethod, claims ...
type ClaimsFactory (line 74) | type ClaimsFactory
function MapClaimsFactory (line 78) | func MapClaimsFactory() jwt.Claims {
function StandardClaimsFactory (line 84) | func StandardClaimsFactory() jwt.Claims {
function NewParser (line 92) | func NewParser(keyFunc jwt.Keyfunc, method jwt.SigningMethod, newClaims ...
FILE: auth/jwt/middleware_test.go
type customClaims (line 15) | type customClaims struct
method VerifyMyProperty (line 20) | func (c customClaims) VerifyMyProperty(p string) bool {
function signingValidator (line 41) | func signingValidator(t *testing.T, signer endpoint.Endpoint, expectedKe...
function TestNewSigner (line 57) | func TestNewSigner(t *testing.T) {
function TestJWTParser (line 70) | func TestJWTParser(t *testing.T) {
function TestIssue562 (line 204) | func TestIssue562(t *testing.T) {
FILE: auth/jwt/transport.go
constant bearer (line 16) | bearer string = "bearer"
constant bearerFormat (line 17) | bearerFormat string = "Bearer %s"
function HTTPToContext (line 22) | func HTTPToContext() http.RequestFunc {
function ContextToHTTP (line 35) | func ContextToHTTP() http.RequestFunc {
function GRPCToContext (line 47) | func GRPCToContext() grpc.ServerRequestFunc {
function ContextToGRPC (line 66) | func ContextToGRPC() grpc.ClientRequestFunc {
function extractTokenFromAuthHeader (line 78) | func extractTokenFromAuthHeader(val string) (token string, ok bool) {
function generateAuthHeaderFromToken (line 87) | func generateAuthHeaderFromToken(token string) string {
FILE: auth/jwt/transport_test.go
function TestHTTPToContext (line 12) | func TestHTTPToContext(t *testing.T) {
function TestContextToHTTP (line 41) | func TestContextToHTTP(t *testing.T) {
function TestGRPCToContext (line 67) | func TestGRPCToContext(t *testing.T) {
function TestContextToGRPC (line 99) | func TestContextToGRPC(t *testing.T) {
FILE: circuitbreaker/gobreaker.go
function Gobreaker (line 16) | func Gobreaker(cb *gobreaker.CircuitBreaker) endpoint.Middleware {
FILE: circuitbreaker/gobreaker_test.go
function TestGobreaker (line 11) | func TestGobreaker(t *testing.T) {
FILE: circuitbreaker/handy_breaker.go
function HandyBreaker (line 19) | func HandyBreaker(cb breaker.Breaker) endpoint.Middleware {
FILE: circuitbreaker/handy_breaker_test.go
function TestHandyBreaker (line 11) | func TestHandyBreaker(t *testing.T) {
FILE: circuitbreaker/hystrix.go
function Hystrix (line 18) | func Hystrix(commandName string) endpoint.Middleware {
FILE: circuitbreaker/hystrix_test.go
function TestHystrix (line 14) | func TestHystrix(t *testing.T) {
FILE: circuitbreaker/util_test.go
function testFailingEndpoint (line 15) | func testFailingEndpoint(
type mock (line 67) | type mock struct
method endpoint (line 72) | func (m *mock) endpoint(context.Context, interface{}) (interface{}, er...
FILE: endpoint/endpoint.go
type Endpoint (line 9) | type Endpoint
function Nop (line 13) | func Nop(context.Context, interface{}) (interface{}, error) { return str...
type Middleware (line 16) | type Middleware
function Chain (line 21) | func Chain(outer Middleware, others ...Middleware) Middleware {
type Failer (line 38) | type Failer interface
FILE: endpoint/endpoint_example_test.go
function ExampleChain (line 10) | func ExampleChain() {
function annotate (line 36) | func annotate(s string) endpoint.Middleware {
function myEndpoint (line 46) | func myEndpoint(context.Context, interface{}) (interface{}, error) {
FILE: log/deprecated_levels/levels.go
type Levels (line 12) | type Levels struct
method With (line 56) | func (l Levels) With(keyvals ...interface{}) Levels {
method Debug (line 69) | func (l Levels) Debug() log.Logger {
method Info (line 74) | func (l Levels) Info() log.Logger {
method Warn (line 79) | func (l Levels) Warn() log.Logger {
method Error (line 84) | func (l Levels) Error() log.Logger {
method Crit (line 89) | func (l Levels) Crit() log.Logger {
function New (line 38) | func New(logger log.Logger, options ...Option) Levels {
type Option (line 94) | type Option
function Key (line 98) | func Key(key string) Option {
function DebugValue (line 104) | func DebugValue(value string) Option {
function InfoValue (line 110) | func InfoValue(value string) Option {
function WarnValue (line 116) | func WarnValue(value string) Option {
function ErrorValue (line 122) | func ErrorValue(value string) Option {
function CritValue (line 128) | func CritValue(value string) Option {
FILE: log/deprecated_levels/levels_test.go
function TestDefaultLevels (line 12) | func TestDefaultLevels(t *testing.T) {
function TestModifiedLevels (line 40) | func TestModifiedLevels(t *testing.T) {
function ExampleLevels (line 57) | func ExampleLevels() {
FILE: log/example_test.go
function Example_basic (line 12) | func Example_basic() {
function Example_contextual (line 32) | func Example_contextual() {
function Example_valuer (line 62) | func Example_valuer() {
function Example_debugInfo (line 81) | func Example_debugInfo() {
function Example_syncWriter (line 106) | func Example_syncWriter() {
FILE: log/json_logger.go
function NewJSONLogger (line 13) | func NewJSONLogger(w io.Writer) Logger {
FILE: log/level/example_test.go
function Example_basic (line 11) | func Example_basic() {
function Example_filtered (line 25) | func Example_filtered() {
FILE: log/level/level.go
function Error (line 9) | func Error(logger log.Logger) log.Logger {
function Warn (line 14) | func Warn(logger log.Logger) log.Logger {
function Info (line 19) | func Info(logger log.Logger) log.Logger {
function Debug (line 24) | func Debug(logger log.Logger) log.Logger {
function NewFilter (line 33) | func NewFilter(next log.Logger, options ...Option) log.Logger {
function AllowAll (line 41) | func AllowAll() Option {
function AllowDebug (line 46) | func AllowDebug() Option {
function AllowInfo (line 51) | func AllowInfo() Option {
function AllowWarn (line 56) | func AllowWarn() Option {
function AllowError (line 61) | func AllowError() Option {
function AllowNone (line 66) | func AllowNone() Option {
function ErrNotAllowed (line 74) | func ErrNotAllowed(err error) Option {
function SquelchNoLevel (line 82) | func SquelchNoLevel(squelch bool) Option {
function ErrNoLevel (line 89) | func ErrNoLevel(err error) Option {
function NewInjector (line 96) | func NewInjector(next log.Logger, lvl Value) log.Logger {
function Key (line 108) | func Key() interface{} { return level.Key() }
function ErrorValue (line 111) | func ErrorValue() Value { return level.ErrorValue() }
function WarnValue (line 114) | func WarnValue() Value { return level.WarnValue() }
function InfoValue (line 117) | func InfoValue() Value { return level.InfoValue() }
function DebugValue (line 120) | func DebugValue() Value { return level.DebugValue() }
FILE: log/log.go
function With (line 24) | func With(logger Logger, keyvals ...interface{}) Logger {
function WithPrefix (line 34) | func WithPrefix(logger Logger, keyvals ...interface{}) Logger {
function WithSuffix (line 44) | func WithSuffix(logger Logger, keyvals ...interface{}) Logger {
FILE: log/logfmt_logger.go
function NewLogfmtLogger (line 13) | func NewLogfmtLogger(w io.Writer) Logger {
FILE: log/logrus/logrus_logger.go
type Logger (line 13) | type Logger struct
method Log (line 43) | func (l Logger) Log(keyvals ...interface{}) error {
type Option (line 18) | type Option
function NewLogger (line 23) | func NewLogger(logger logrus.FieldLogger, options ...Option) log.Logger {
function WithLevel (line 37) | func WithLevel(level logrus.Level) Option {
FILE: log/logrus/logrus_logger_test.go
function TestLogrusLogger (line 14) | func TestLogrusLogger(t *testing.T) {
type mymap (line 54) | type mymap
method String (line 56) | func (m mymap) String() string { return "special_behavior" }
function TestWithLevel (line 58) | func TestWithLevel(t *testing.T) {
FILE: log/nop_logger.go
function NewNopLogger (line 6) | func NewNopLogger() Logger {
FILE: log/stdlib.go
function TimestampKey (line 26) | func TimestampKey(key string) StdlibAdapterOption {
function FileKey (line 31) | func FileKey(key string) StdlibAdapterOption {
function MessageKey (line 36) | func MessageKey(key string) StdlibAdapterOption {
function Prefix (line 46) | func Prefix(prefix string, joinPrefixToMsg bool) StdlibAdapterOption {
function NewStdlibAdapter (line 52) | func NewStdlibAdapter(logger Logger, options ...StdlibAdapterOption) io....
FILE: log/sync.go
function NewSyncWriter (line 27) | func NewSyncWriter(w io.Writer) io.Writer {
function NewSyncLogger (line 35) | func NewSyncLogger(logger Logger) Logger {
FILE: log/syslog/example_test.go
function ExampleNewSyslogLogger_defaultPrioritySelector (line 17) | func ExampleNewSyslogLogger_defaultPrioritySelector() {
FILE: log/syslog/syslog.go
function NewSyslogLogger (line 20) | func NewSyslogLogger(w SyslogWriter, newLogger func(io.Writer) log.Logge...
function PrioritySelectorOption (line 32) | func PrioritySelectorOption(selector PrioritySelector) Option {
FILE: log/term/colorlogger.go
constant Default (line 15) | Default = term.Default
constant Black (line 17) | Black = term.Black
constant DarkRed (line 18) | DarkRed = term.DarkRed
constant DarkGreen (line 19) | DarkGreen = term.DarkGreen
constant Brown (line 20) | Brown = term.Brown
constant DarkBlue (line 21) | DarkBlue = term.DarkBlue
constant DarkMagenta (line 22) | DarkMagenta = term.DarkMagenta
constant DarkCyan (line 23) | DarkCyan = term.DarkCyan
constant Gray (line 24) | Gray = term.Gray
constant DarkGray (line 26) | DarkGray = term.DarkGray
constant Red (line 27) | Red = term.Red
constant Green (line 28) | Green = term.Green
constant Yellow (line 29) | Yellow = term.Yellow
constant Blue (line 30) | Blue = term.Blue
constant Magenta (line 31) | Magenta = term.Magenta
constant Cyan (line 32) | Cyan = term.Cyan
constant White (line 33) | White = term.White
function NewColorLogger (line 42) | func NewColorLogger(w io.Writer, newLogger func(io.Writer) log.Logger, c...
FILE: log/term/colorwriter.go
function NewColorWriter (line 12) | func NewColorWriter(w io.Writer) io.Writer {
FILE: log/term/example_test.go
function ExampleNewLogger_redErrors (line 11) | func ExampleNewLogger_redErrors() {
function ExampleNewLogger_levelColors (line 28) | func ExampleNewLogger_levelColors() {
FILE: log/term/term.go
function NewLogger (line 16) | func NewLogger(w io.Writer, newLogger func(io.Writer) log.Logger, color ...
function IsTerminal (line 21) | func IsTerminal(w io.Writer) bool {
FILE: log/value.go
function Timestamp (line 19) | func Timestamp(t func() time.Time) Valuer {
function TimestampFormat (line 30) | func TimestampFormat(t func() time.Time, layout string) Valuer {
function Caller (line 36) | func Caller(depth int) Valuer {
FILE: log/zap/zap_sugar_logger.go
type zapSugarLogger (line 9) | type zapSugarLogger
method Log (line 11) | func (l zapSugarLogger) Log(kv ...interface{}) error {
function NewZapSugarLogger (line 18) | func NewZapSugarLogger(logger *zap.Logger, level zapcore.Level) log.Logg...
FILE: log/zap/zap_sugar_logger_test.go
function TestZapSugarLogger (line 12) | func TestZapSugarLogger(t *testing.T) {
type tbWriter (line 77) | type tbWriter struct
method Write (line 82) | func (w *tbWriter) Write(b []byte) (n int, err error) {
FILE: metrics/cloudwatch/cloudwatch.go
constant maxConcurrentRequests (line 22) | maxConcurrentRequests = 20
constant maxValuesInABatch (line 23) | maxValuesInABatch = 150
type CloudWatch (line 31) | type CloudWatch struct
method NewCounter (line 112) | func (cw *CloudWatch) NewCounter(name string) metrics.Counter {
method NewGauge (line 120) | func (cw *CloudWatch) NewGauge(name string) metrics.Gauge {
method NewHistogram (line 129) | func (cw *CloudWatch) NewHistogram(name string) metrics.Histogram {
method WriteLoop (line 140) | func (cw *CloudWatch) WriteLoop(ctx context.Context, c <-chan time.Tim...
method Send (line 155) | func (cw *CloudWatch) Send() error {
type Option (line 45) | type Option
function WithLogger (line 49) | func WithLogger(logger log.Logger) Option {
function WithPercentiles (line 59) | func WithPercentiles(percentiles ...float64) Option {
function WithConcurrentRequests (line 75) | func WithConcurrentRequests(n int) Option {
function New (line 88) | func New(namespace string, svc cloudwatchiface.CloudWatchAPI, options .....
function sum (line 262) | func sum(a []float64) float64 {
function min (line 270) | func min(a, b int) int {
type observeFunc (line 277) | type observeFunc
type Counter (line 281) | type Counter struct
method With (line 288) | func (c *Counter) With(labelValues ...string) metrics.Counter {
method Add (line 297) | func (c *Counter) Add(delta float64) {
type Gauge (line 303) | type Gauge struct
method With (line 311) | func (g *Gauge) With(labelValues ...string) metrics.Gauge {
method Set (line 321) | func (g *Gauge) Set(value float64) {
method Add (line 326) | func (g *Gauge) Add(delta float64) {
type Histogram (line 332) | type Histogram struct
method With (line 339) | func (h *Histogram) With(labelValues ...string) metrics.Histogram {
method Observe (line 348) | func (h *Histogram) Observe(value float64) {
function makeDimensions (line 352) | func makeDimensions(labelValues ...string) []*cloudwatch.Dimension {
FILE: metrics/cloudwatch/cloudwatch_test.go
constant metricNameToGenerateError (line 18) | metricNameToGenerateError = "metric_name_used_to_throw_an_error"
type mockCloudWatch (line 22) | type mockCloudWatch struct
method PutMetricData (line 36) | func (mcw *mockCloudWatch) PutMetricData(input *cloudwatch.PutMetricDa...
method testDimensions (line 56) | func (mcw *mockCloudWatch) testDimensions(name string, labelValues ......
function newMockCloudWatch (line 29) | func newMockCloudWatch() *mockCloudWatch {
function TestCounter (line 86) | func TestCounter(t *testing.T) {
function TestCounterLowSendConcurrency (line 114) | func TestCounterLowSendConcurrency(t *testing.T) {
function TestGauge (line 156) | func TestGauge(t *testing.T) {
function TestHistogram (line 181) | func TestHistogram(t *testing.T) {
function TestErrorLog (line 291) | func TestErrorLog(t *testing.T) {
FILE: metrics/cloudwatch2/cloudwatch2.go
constant maxConcurrentRequests (line 23) | maxConcurrentRequests = 20
type CloudWatchAPI (line 27) | type CloudWatchAPI interface
type CloudWatch (line 36) | type CloudWatch struct
method NewCounter (line 94) | func (cw *CloudWatch) NewCounter(name string) metrics.Counter {
method NewGauge (line 104) | func (cw *CloudWatch) NewGauge(name string) metrics.Gauge {
method NewHistogram (line 111) | func (cw *CloudWatch) NewHistogram(name string) metrics.Histogram {
method WriteLoop (line 119) | func (cw *CloudWatch) WriteLoop(ctx context.Context, c <-chan time.Tim...
method Send (line 134) | func (cw *CloudWatch) Send() error {
type Option (line 47) | type Option
function WithLogger (line 51) | func WithLogger(logger log.Logger) Option {
function WithConcurrentRequests (line 61) | func WithConcurrentRequests(n int) Option {
function New (line 74) | func New(namespace string, svc CloudWatchAPI, options ...Option) *CloudW...
function stats (line 191) | func stats(a []float64) *types.StatisticSet {
function makeDimensions (line 218) | func makeDimensions(labelValues ...string) []types.Dimension {
type observeFunc (line 229) | type observeFunc
type Counter (line 233) | type Counter struct
method With (line 240) | func (c *Counter) With(labelValues ...string) metrics.Counter {
method Add (line 249) | func (c *Counter) Add(delta float64) {
FILE: metrics/cloudwatch2/cloudwatch2_test.go
function TestStats (line 12) | func TestStats(t *testing.T) {
type mockCloudWatch (line 74) | type mockCloudWatch struct
method PutMetricData (line 80) | func (mcw *mockCloudWatch) PutMetricData(ctx context.Context, params *...
function TestSend (line 87) | func TestSend(t *testing.T) {
FILE: metrics/discard/discard.go
type counter (line 6) | type counter struct
method With (line 12) | func (c counter) With(labelValues ...string) metrics.Counter { return c }
method Add (line 15) | func (c counter) Add(delta float64) {}
function NewCounter (line 9) | func NewCounter() metrics.Counter { return counter{} }
type gauge (line 17) | type gauge struct
method With (line 23) | func (g gauge) With(labelValues ...string) metrics.Gauge { return g }
method Set (line 26) | func (g gauge) Set(value float64) {}
method Add (line 29) | func (g gauge) Add(delta float64) {}
function NewGauge (line 20) | func NewGauge() metrics.Gauge { return gauge{} }
type histogram (line 31) | type histogram struct
method With (line 37) | func (h histogram) With(labelValues ...string) metrics.Histogram { ret...
method Observe (line 40) | func (h histogram) Observe(value float64) {}
function NewHistogram (line 34) | func NewHistogram() metrics.Histogram { return histogram{} }
FILE: metrics/dogstatsd/dogstatsd.go
type Dogstatsd (line 41) | type Dogstatsd struct
method NewCounter (line 73) | func (d *Dogstatsd) NewCounter(name string, sampleRate float64) *Count...
method NewGauge (line 82) | func (d *Dogstatsd) NewGauge(name string) *Gauge {
method NewTiming (line 95) | func (d *Dogstatsd) NewTiming(name string, sampleRate float64) *Timing {
method NewHistogram (line 105) | func (d *Dogstatsd) NewHistogram(name string, sampleRate float64) *His...
method WriteLoop (line 117) | func (d *Dogstatsd) WriteLoop(ctx context.Context, c <-chan time.Time,...
method SendLoop (line 135) | func (d *Dogstatsd) SendLoop(ctx context.Context, c <-chan time.Time, ...
method WriteTo (line 143) | func (d *Dogstatsd) WriteTo(w io.Writer) (count int64, err error) {
method tagValues (line 220) | func (d *Dogstatsd) tagValues(labelValues []string) string {
function New (line 56) | func New(prefix string, logger log.Logger, lvs ...string) *Dogstatsd {
function sum (line 204) | func sum(a []float64) float64 {
function sampling (line 212) | func sampling(r float64) string {
type observeFunc (line 237) | type observeFunc
function sampleObservations (line 240) | func sampleObservations(obs observeFunc, sampleRate float64) observeFunc {
type Counter (line 254) | type Counter struct
method With (line 261) | func (c *Counter) With(labelValues ...string) metrics.Counter {
method Add (line 270) | func (c *Counter) Add(delta float64) {
type Gauge (line 276) | type Gauge struct
method With (line 283) | func (g *Gauge) With(labelValues ...string) metrics.Gauge {
method Set (line 293) | func (g *Gauge) Set(value float64) {
method Add (line 299) | func (g *Gauge) Add(delta float64) {
method touch (line 398) | func (g *Gauge) touch() {
method read (line 402) | func (g *Gauge) read() (float64, bool) {
type Timing (line 307) | type Timing struct
method With (line 314) | func (t *Timing) With(labelValues ...string) metrics.Histogram {
method Observe (line 323) | func (t *Timing) Observe(value float64) {
type Histogram (line 329) | type Histogram struct
method With (line 336) | func (h *Histogram) With(labelValues ...string) metrics.Histogram {
method Observe (line 345) | func (h *Histogram) Observe(value float64) {
type pair (line 349) | type pair struct
type gaugeNode (line 351) | type gaugeNode struct
method addGauge (line 357) | func (n *gaugeNode) addGauge(g *Gauge, lvs lv.LabelValues) *Gauge {
method walk (line 381) | func (n *gaugeNode) walk(fn func(string, lv.LabelValues, float64) bool...
FILE: metrics/dogstatsd/dogstatsd_test.go
function TestCounter (line 10) | func TestCounter(t *testing.T) {
function TestCounterSampled (line 22) | func TestCounterSampled(t *testing.T) {
function TestGauge (line 29) | func TestGauge(t *testing.T) {
function TestHistogram (line 44) | func TestHistogram(t *testing.T) {
function TestHistogramSampled (line 56) | func TestHistogramSampled(t *testing.T) {
function TestTiming (line 68) | func TestTiming(t *testing.T) {
function TestTimingSampled (line 80) | func TestTimingSampled(t *testing.T) {
FILE: metrics/expvar/expvar.go
type Counter (line 15) | type Counter struct
method With (line 28) | func (c *Counter) With(labelValues ...string) metrics.Counter { return...
method Add (line 31) | func (c *Counter) Add(delta float64) { c.f.Add(delta) }
function NewCounter (line 21) | func NewCounter(name string) *Counter {
type Gauge (line 35) | type Gauge struct
method With (line 48) | func (g *Gauge) With(labelValues ...string) metrics.Gauge { return g }
method Set (line 51) | func (g *Gauge) Set(value float64) { g.f.Set(value) }
method Add (line 54) | func (g *Gauge) Add(delta float64) { g.f.Add(delta) }
function NewGauge (line 41) | func NewGauge(name string) *Gauge {
type Histogram (line 60) | type Histogram struct
method With (line 83) | func (h *Histogram) With(labelValues ...string) metrics.Histogram { re...
method Observe (line 86) | func (h *Histogram) Observe(value float64) {
function NewHistogram (line 72) | func NewHistogram(name string, buckets int) *Histogram {
FILE: metrics/expvar/expvar_test.go
function TestCounter (line 10) | func TestCounter(t *testing.T) {
function TestGauge (line 18) | func TestGauge(t *testing.T) {
function TestHistogram (line 26) | func TestHistogram(t *testing.T) {
FILE: metrics/generic/generic.go
type Counter (line 20) | type Counter struct
method With (line 34) | func (c *Counter) With(labelValues ...string) metrics.Counter {
method Add (line 43) | func (c *Counter) Add(delta float64) {
method Value (line 57) | func (c *Counter) Value() float64 {
method ValueReset (line 64) | func (c *Counter) ValueReset() float64 {
method LabelValues (line 78) | func (c *Counter) LabelValues() []string {
function NewCounter (line 27) | func NewCounter(name string) *Counter {
type Gauge (line 83) | type Gauge struct
method With (line 97) | func (g *Gauge) With(labelValues ...string) metrics.Gauge {
method Set (line 106) | func (g *Gauge) Set(value float64) {
method Add (line 111) | func (g *Gauge) Add(delta float64) {
method Value (line 125) | func (g *Gauge) Value() float64 {
method LabelValues (line 130) | func (g *Gauge) LabelValues() []string {
function NewGauge (line 90) | func NewGauge(name string) *Gauge {
type Histogram (line 137) | type Histogram struct
method With (line 153) | func (h *Histogram) With(labelValues ...string) metrics.Histogram {
method Observe (line 162) | func (h *Histogram) Observe(value float64) {
method Quantile (line 169) | func (h *Histogram) Quantile(q float64) float64 {
method LabelValues (line 176) | func (h *Histogram) LabelValues() []string {
method Print (line 182) | func (h *Histogram) Print(w io.Writer) {
function NewHistogram (line 145) | func NewHistogram(name string, buckets int) *Histogram {
type safeHistogram (line 189) | type safeHistogram struct
type Bucket (line 195) | type Bucket struct
type Quantile (line 200) | type Quantile struct
type SimpleHistogram (line 207) | type SimpleHistogram struct
method With (line 220) | func (h *SimpleHistogram) With(labelValues ...string) metrics.Histogram {
method Observe (line 229) | func (h *SimpleHistogram) Observe(value float64) {
method ApproximateMovingAverage (line 238) | func (h *SimpleHistogram) ApproximateMovingAverage() float64 {
method LabelValues (line 245) | func (h *SimpleHistogram) LabelValues() []string {
function NewSimpleHistogram (line 215) | func NewSimpleHistogram() *SimpleHistogram {
FILE: metrics/generic/generic_test.go
function TestCounter (line 23) | func TestCounter(t *testing.T) {
function TestValueReset (line 35) | func TestValueReset(t *testing.T) {
function TestGauge (line 48) | func TestGauge(t *testing.T) {
function TestHistogram (line 60) | func TestHistogram(t *testing.T) {
function TestIssue424 (line 74) | func TestIssue424(t *testing.T) {
function TestSimpleHistogram (line 95) | func TestSimpleHistogram(t *testing.T) {
function TestAtomicAlignment (line 121) | func TestAtomicAlignment(t *testing.T) {
function checkAtomicAlignment (line 153) | func checkAtomicAlignment(t *testing.T, sizes types.Sizes, obj types.Obj...
FILE: metrics/graphite/graphite.go
type Graphite (line 33) | type Graphite struct
method NewCounter (line 57) | func (g *Graphite) NewCounter(name string) *Counter {
method NewGauge (line 67) | func (g *Graphite) NewGauge(name string) *Gauge {
method NewHistogram (line 78) | func (g *Graphite) NewHistogram(name string, buckets int) *Histogram {
method WriteLoop (line 90) | func (g *Graphite) WriteLoop(ctx context.Context, c <-chan time.Time, ...
method SendLoop (line 108) | func (g *Graphite) SendLoop(ctx context.Context, c <-chan time.Time, n...
method WriteTo (line 117) | func (g *Graphite) WriteTo(w io.Writer) (count int64, err error) {
function New (line 45) | func New(prefix string, logger log.Logger) *Graphite {
type Counter (line 160) | type Counter struct
method With (line 170) | func (c *Counter) With(...string) metrics.Counter { return c }
method Add (line 173) | func (c *Counter) Add(delta float64) { c.c.Add(delta) }
function NewCounter (line 165) | func NewCounter(name string) *Counter {
type Gauge (line 176) | type Gauge struct
method With (line 186) | func (g *Gauge) With(...string) metrics.Gauge { return g }
method Set (line 189) | func (g *Gauge) Set(value float64) { g.g.Set(value) }
method Add (line 192) | func (g *Gauge) Add(delta float64) { g.g.Add(delta) }
function NewGauge (line 181) | func NewGauge(name string) *Gauge {
type Histogram (line 196) | type Histogram struct
method With (line 206) | func (h *Histogram) With(...string) metrics.Histogram { return h }
method Observe (line 209) | func (h *Histogram) Observe(value float64) { h.h.Observe(value) }
function NewHistogram (line 201) | func NewHistogram(name string, buckets int) *Histogram {
FILE: metrics/graphite/graphite_test.go
function TestCounter (line 13) | func TestCounter(t *testing.T) {
function TestGauge (line 25) | func TestGauge(t *testing.T) {
function TestHistogram (line 37) | func TestHistogram(t *testing.T) {
FILE: metrics/influx/example_test.go
function ExampleCounter (line 12) | func ExampleCounter() {
function ExampleGauge (line 39) | func ExampleGauge() {
function ExampleHistogram (line 71) | func ExampleHistogram() {
function extractAndPrintMessage (line 98) | func extractAndPrintMessage(expected []string, msg string) error {
FILE: metrics/influx/influx.go
type Influx (line 34) | type Influx struct
method NewCounter (line 58) | func (in *Influx) NewCounter(name string) *Counter {
method NewGauge (line 66) | func (in *Influx) NewGauge(name string) *Gauge {
method NewHistogram (line 75) | func (in *Influx) NewHistogram(name string) *Histogram {
method WriteLoop (line 92) | func (in *Influx) WriteLoop(ctx context.Context, c <-chan time.Time, w...
method WriteTo (line 109) | func (in *Influx) WriteTo(w BatchPointsWriter) (err error) {
function New (line 46) | func New(tags map[string]string, conf influxdb.BatchPointsConfig, logger...
type BatchPointsWriter (line 84) | type BatchPointsWriter interface
function mergeTags (line 174) | func mergeTags(tags map[string]string, labelValues []string) map[string]...
function sum (line 188) | func sum(a []float64) float64 {
function last (line 196) | func last(a []float64) float64 {
type observeFunc (line 200) | type observeFunc
type Counter (line 204) | type Counter struct
method With (line 211) | func (c *Counter) With(labelValues ...string) metrics.Counter {
method Add (line 220) | func (c *Counter) Add(delta float64) {
type Gauge (line 226) | type Gauge struct
method With (line 234) | func (g *Gauge) With(labelValues ...string) metrics.Gauge {
method Set (line 244) | func (g *Gauge) Set(value float64) {
method Add (line 249) | func (g *Gauge) Add(delta float64) {
type Histogram (line 255) | type Histogram struct
method With (line 262) | func (h *Histogram) With(labelValues ...string) metrics.Histogram {
method Observe (line 271) | func (h *Histogram) Observe(value float64) {
FILE: metrics/influx/influx_test.go
function TestCounter (line 17) | func TestCounter(t *testing.T) {
function TestGauge (line 33) | func TestGauge(t *testing.T) {
function TestHistogram (line 49) | func TestHistogram(t *testing.T) {
function TestHistogramLabels (line 71) | func TestHistogramLabels(t *testing.T) {
function TestIssue404 (line 85) | func TestIssue404(t *testing.T) {
type bufWriter (line 116) | type bufWriter struct
method Write (line 120) | func (w *bufWriter) Write(bp influxdb.BatchPoints) error {
FILE: metrics/influxstatsd/influxstatsd.go
type Influxstatsd (line 40) | type Influxstatsd struct
method NewCounter (line 72) | func (d *Influxstatsd) NewCounter(name string, sampleRate float64) *Co...
method NewGauge (line 81) | func (d *Influxstatsd) NewGauge(name string) *Gauge {
method NewTiming (line 94) | func (d *Influxstatsd) NewTiming(name string, sampleRate float64) *Tim...
method NewHistogram (line 104) | func (d *Influxstatsd) NewHistogram(name string, sampleRate float64) *...
method WriteLoop (line 116) | func (d *Influxstatsd) WriteLoop(ctx context.Context, c <-chan time.Ti...
method SendLoop (line 134) | func (d *Influxstatsd) SendLoop(ctx context.Context, c <-chan time.Tim...
method WriteTo (line 142) | func (d *Influxstatsd) WriteTo(w io.Writer) (count int64, err error) {
method tagValues (line 219) | func (d *Influxstatsd) tagValues(labelValues []string) string {
function New (line 55) | func New(prefix string, logger log.Logger, lvs ...string) *Influxstatsd {
function sum (line 203) | func sum(a []float64) float64 {
function sampling (line 211) | func sampling(r float64) string {
type observeFunc (line 236) | type observeFunc
type Counter (line 240) | type Counter struct
method With (line 247) | func (c *Counter) With(labelValues ...string) metrics.Counter {
method Add (line 256) | func (c *Counter) Add(delta float64) {
type Gauge (line 262) | type Gauge struct
method With (line 269) | func (g *Gauge) With(labelValues ...string) metrics.Gauge {
method Set (line 279) | func (g *Gauge) Set(value float64) {
method Add (line 285) | func (g *Gauge) Add(delta float64) {
method touch (line 384) | func (g *Gauge) touch() {
method read (line 388) | func (g *Gauge) read() (float64, bool) {
type Timing (line 293) | type Timing struct
method With (line 300) | func (t *Timing) With(labelValues ...string) metrics.Histogram {
method Observe (line 309) | func (t *Timing) Observe(value float64) {
type Histogram (line 315) | type Histogram struct
method With (line 322) | func (h *Histogram) With(labelValues ...string) metrics.Histogram {
method Observe (line 331) | func (h *Histogram) Observe(value float64) {
type pair (line 335) | type pair struct
type gaugeNode (line 337) | type gaugeNode struct
method addGauge (line 343) | func (n *gaugeNode) addGauge(g *Gauge, lvs lv.LabelValues) *Gauge {
method walk (line 367) | func (n *gaugeNode) walk(fn func(string, lv.LabelValues, float64) bool...
FILE: metrics/influxstatsd/influxstatsd_test.go
function TestCounter (line 10) | func TestCounter(t *testing.T) {
function TestCounterSampled (line 22) | func TestCounterSampled(t *testing.T) {
function TestGauge (line 29) | func TestGauge(t *testing.T) {
function TestHistogram (line 44) | func TestHistogram(t *testing.T) {
function TestHistogramSampled (line 56) | func TestHistogramSampled(t *testing.T) {
function TestTiming (line 68) | func TestTiming(t *testing.T) {
function TestTimingSampled (line 80) | func TestTimingSampled(t *testing.T) {
FILE: metrics/internal/convert/convert.go
type counterHistogram (line 7) | type counterHistogram struct
method With (line 18) | func (ch counterHistogram) With(labelValues ...string) metrics.Histogr...
method Observe (line 23) | func (ch counterHistogram) Observe(value float64) {
function NewCounterAsHistogram (line 13) | func NewCounterAsHistogram(c metrics.Counter) metrics.Histogram {
type histogramCounter (line 27) | type histogramCounter struct
method With (line 38) | func (hc histogramCounter) With(labelValues ...string) metrics.Counter {
method Add (line 43) | func (hc histogramCounter) Add(delta float64) {
function NewHistogramAsCounter (line 33) | func NewHistogramAsCounter(h metrics.Histogram) metrics.Counter {
type counterGauge (line 47) | type counterGauge struct
method With (line 58) | func (cg counterGauge) With(labelValues ...string) metrics.Gauge {
method Set (line 63) | func (cg counterGauge) Set(value float64) {
method Add (line 68) | func (cg counterGauge) Add(delta float64) {
function NewCounterAsGauge (line 53) | func NewCounterAsGauge(c metrics.Counter) metrics.Gauge {
type gaugeCounter (line 72) | type gaugeCounter struct
method With (line 83) | func (gc gaugeCounter) With(labelValues ...string) metrics.Counter {
method Add (line 88) | func (gc gaugeCounter) Add(delta float64) {
function NewGaugeAsCounter (line 78) | func NewGaugeAsCounter(g metrics.Gauge) metrics.Counter {
type histogramGauge (line 92) | type histogramGauge struct
method With (line 103) | func (hg histogramGauge) With(labelValues ...string) metrics.Gauge {
method Set (line 108) | func (hg histogramGauge) Set(value float64) {
method Add (line 113) | func (hg histogramGauge) Add(delta float64) {
function NewHistogramAsGauge (line 98) | func NewHistogramAsGauge(h metrics.Histogram) metrics.Gauge {
type gaugeHistogram (line 117) | type gaugeHistogram struct
method With (line 128) | func (gh gaugeHistogram) With(labelValues ...string) metrics.Histogram {
method Observe (line 133) | func (gh gaugeHistogram) Observe(value float64) {
function NewGaugeAsHistogram (line 123) | func NewGaugeAsHistogram(g metrics.Gauge) metrics.Histogram {
FILE: metrics/internal/convert/convert_test.go
function TestCounterHistogramConversion (line 10) | func TestCounterHistogramConversion(t *testing.T) {
function TestCounterGaugeConversion (line 25) | func TestCounterGaugeConversion(t *testing.T) {
function TestHistogramGaugeConversion (line 40) | func TestHistogramGaugeConversion(t *testing.T) {
FILE: metrics/internal/lv/labelvalues.go
type LabelValues (line 6) | type LabelValues
method With (line 9) | func (lvs LabelValues) With(labelValues ...string) LabelValues {
FILE: metrics/internal/lv/labelvalues_test.go
function TestWith (line 8) | func TestWith(t *testing.T) {
FILE: metrics/internal/lv/space.go
function NewSpace (line 6) | func NewSpace() *Space {
type Space (line 13) | type Space struct
method Observe (line 20) | func (s *Space) Observe(name string, lvs LabelValues, value float64) {
method Add (line 27) | func (s *Space) Add(name string, lvs LabelValues, delta float64) {
method Walk (line 33) | func (s *Space) Walk(fn func(name string, lvs LabelValues, observation...
method Reset (line 46) | func (s *Space) Reset() *Space {
method nodeFor (line 54) | func (s *Space) nodeFor(name string) *node {
type node (line 71) | type node struct
method observe (line 79) | func (n *node) observe(lvs LabelValues, value float64) {
method add (line 101) | func (n *node) add(lvs LabelValues, delta float64) {
method walk (line 129) | func (n *node) walk(lvs LabelValues, fn func(LabelValues, []float64) b...
type pair (line 77) | type pair struct
function last (line 143) | func last(a []float64) float64 {
FILE: metrics/internal/lv/space_test.go
function TestSpaceWalkAbort (line 8) | func TestSpaceWalkAbort(t *testing.T) {
function TestSpaceWalkSums (line 29) | func TestSpaceWalkSums(t *testing.T) {
function TestSpaceWalkSkipsEmptyDimensions (line 66) | func TestSpaceWalkSkipsEmptyDimensions(t *testing.T) {
function sum (line 80) | func sum(a []float64) (v float64) {
FILE: metrics/internal/ratemap/ratemap.go
type RateMap (line 10) | type RateMap struct
method Set (line 24) | func (m *RateMap) Set(name string, rate float64) {
method Get (line 32) | func (m *RateMap) Get(name string) float64 {
function New (line 16) | func New() *RateMap {
FILE: metrics/metrics.go
type Counter (line 5) | type Counter interface
type Gauge (line 12) | type Gauge interface
type Histogram (line 22) | type Histogram interface
FILE: metrics/multi/multi.go
type Counter (line 10) | type Counter
method Add (line 18) | func (c Counter) Add(delta float64) {
method With (line 25) | func (c Counter) With(labelValues ...string) metrics.Counter {
function NewCounter (line 13) | func NewCounter(c ...metrics.Counter) Counter {
type Gauge (line 34) | type Gauge
method Set (line 42) | func (g Gauge) Set(value float64) {
method With (line 49) | func (g Gauge) With(labelValues ...string) metrics.Gauge {
method Add (line 58) | func (g Gauge) Add(delta float64) {
function NewGauge (line 37) | func NewGauge(g ...metrics.Gauge) Gauge {
type Histogram (line 65) | type Histogram
method Observe (line 73) | func (h Histogram) Observe(value float64) {
method With (line 80) | func (h Histogram) With(labelValues ...string) metrics.Histogram {
function NewHistogram (line 68) | func NewHistogram(h ...metrics.Histogram) Histogram {
FILE: metrics/multi/multi_test.go
function TestMultiCounter (line 10) | func TestMultiCounter(t *testing.T) {
function TestMultiGauge (line 27) | func TestMultiGauge(t *testing.T) {
function TestMultiHistogram (line 46) | func TestMultiHistogram(t *testing.T) {
type mockCounter (line 65) | type mockCounter struct
method Add (line 69) | func (c *mockCounter) Add(delta float64) { c.obs = append...
method With (line 70) | func (c *mockCounter) With(...string) metrics.Counter { return c }
method String (line 71) | func (c *mockCounter) String() string { return fmt.Spr...
type mockGauge (line 73) | type mockGauge struct
method Set (line 77) | func (g *mockGauge) Set(value float64) { g.obs = append(g.o...
method With (line 78) | func (g *mockGauge) With(...string) metrics.Gauge { return g }
method String (line 79) | func (g *mockGauge) String() string { return fmt.Sprintf...
method Add (line 80) | func (g *mockGauge) Add(delta float64) {
type mockHistogram (line 90) | type mockHistogram struct
method Observe (line 94) | func (h *mockHistogram) Observe(value float64) { h.obs = ap...
method With (line 95) | func (h *mockHistogram) With(...string) metrics.Histogram { return h }
method String (line 96) | func (h *mockHistogram) String() string { return fmt...
FILE: metrics/pcp/pcp.go
type Reporter (line 10) | type Reporter struct
method Start (line 29) | func (r *Reporter) Start() { r.c.MustStart() }
method Stop (line 33) | func (r *Reporter) Stop() { r.c.MustStop() }
method NewCounter (line 43) | func (r *Reporter) NewCounter(name string, desc ...string) (*Counter, ...
method NewGauge (line 68) | func (r *Reporter) NewGauge(name string, desc ...string) (*Gauge, erro...
method NewHistogram (line 99) | func (r *Reporter) NewHistogram(name string, min, max int64, unit spee...
function NewReporter (line 18) | func NewReporter(appname string) (*Reporter, error) {
type Counter (line 36) | type Counter struct
method With (line 54) | func (c *Counter) With(labelValues ...string) metrics.Counter { return...
method Add (line 58) | func (c *Counter) Add(delta float64) { c.c.Inc(int64(delta)) }
type Gauge (line 61) | type Gauge struct
method With (line 79) | func (g *Gauge) With(labelValues ...string) metrics.Gauge { return g }
method Set (line 82) | func (g *Gauge) Set(value float64) { g.g.Set(value) }
method Add (line 85) | func (g *Gauge) Add(delta float64) { g.g.Inc(delta) }
type Histogram (line 88) | type Histogram struct
method With (line 110) | func (h *Histogram) With(labelValues ...string) metrics.Histogram { re...
method Observe (line 118) | func (h *Histogram) Observe(value float64) { h.h.MustRecord(int64(valu...
method Mean (line 121) | func (h *Histogram) Mean() float64 { return h.h.Mean() }
method Percentile (line 125) | func (h *Histogram) Percentile(p float64) int64 { return h.h.Percentil...
FILE: metrics/pcp/pcp_test.go
function TestCounter (line 11) | func TestCounter(t *testing.T) {
function TestGauge (line 30) | func TestGauge(t *testing.T) {
function TestHistogram (line 49) | func TestHistogram(t *testing.T) {
FILE: metrics/prometheus/prometheus.go
type Counter (line 15) | type Counter struct
method With (line 36) | func (c *Counter) With(labelValues ...string) metrics.Counter {
method Add (line 44) | func (c *Counter) Add(delta float64) {
function NewCounterFrom (line 22) | func NewCounterFrom(opts prometheus.CounterOpts, labelNames []string) *C...
function NewCounter (line 29) | func NewCounter(cv *prometheus.CounterVec) *Counter {
type Gauge (line 49) | type Gauge struct
method With (line 70) | func (g *Gauge) With(labelValues ...string) metrics.Gauge {
method Set (line 78) | func (g *Gauge) Set(value float64) {
method Add (line 83) | func (g *Gauge) Add(delta float64) {
function NewGaugeFrom (line 56) | func NewGaugeFrom(opts prometheus.GaugeOpts, labelNames []string) *Gauge {
function NewGauge (line 63) | func NewGauge(gv *prometheus.GaugeVec) *Gauge {
type Summary (line 90) | type Summary struct
method With (line 111) | func (s *Summary) With(labelValues ...string) metrics.Histogram {
method Observe (line 119) | func (s *Summary) Observe(value float64) {
function NewSummaryFrom (line 97) | func NewSummaryFrom(opts prometheus.SummaryOpts, labelNames []string) *S...
function NewSummary (line 104) | func NewSummary(sv *prometheus.SummaryVec) *Summary {
type Histogram (line 126) | type Histogram struct
method With (line 147) | func (h *Histogram) With(labelValues ...string) metrics.Histogram {
method Observe (line 155) | func (h *Histogram) Observe(value float64) {
function NewHistogramFrom (line 133) | func NewHistogramFrom(opts prometheus.HistogramOpts, labelNames []string...
function NewHistogram (line 140) | func NewHistogram(hv *prometheus.HistogramVec) *Histogram {
function makeLabels (line 159) | func makeLabels(labelValues ...string) prometheus.Labels {
FILE: metrics/prometheus/prometheus_test.go
function TestCounter (line 20) | func TestCounter(t *testing.T) {
function TestGauge (line 51) | func TestGauge(t *testing.T) {
function TestSummary (line 82) | func TestSummary(t *testing.T) {
function TestHistogram (line 122) | func TestHistogram(t *testing.T) {
function TestInconsistentLabelCardinality (line 192) | func TestInconsistentLabelCardinality(t *testing.T) {
FILE: metrics/provider/discard.go
type discardProvider (line 8) | type discardProvider struct
method NewCounter (line 15) | func (discardProvider) NewCounter(string) metrics.Counter { return dis...
method NewGauge (line 18) | func (discardProvider) NewGauge(string) metrics.Gauge { return discard...
method NewHistogram (line 21) | func (discardProvider) NewHistogram(string, int) metrics.Histogram { r...
method Stop (line 24) | func (discardProvider) Stop() {}
function NewDiscardProvider (line 12) | func NewDiscardProvider() Provider { return discardProvider{} }
FILE: metrics/provider/dogstatsd.go
type dogstatsdProvider (line 8) | type dogstatsdProvider struct
method NewCounter (line 25) | func (p *dogstatsdProvider) NewCounter(name string) metrics.Counter {
method NewGauge (line 30) | func (p *dogstatsdProvider) NewGauge(name string) metrics.Gauge {
method NewHistogram (line 36) | func (p *dogstatsdProvider) NewHistogram(name string, _ int) metrics.H...
method Stop (line 41) | func (p *dogstatsdProvider) Stop() {
function NewDogstatsdProvider (line 16) | func NewDogstatsdProvider(d *dogstatsd.Dogstatsd, stop func()) Provider {
FILE: metrics/provider/expvar.go
type expvarProvider (line 8) | type expvarProvider struct
method NewCounter (line 16) | func (p expvarProvider) NewCounter(name string) metrics.Counter {
method NewGauge (line 21) | func (p expvarProvider) NewGauge(name string) metrics.Gauge {
method NewHistogram (line 26) | func (p expvarProvider) NewHistogram(name string, buckets int) metrics...
method Stop (line 31) | func (p expvarProvider) Stop() {}
function NewExpvarProvider (line 11) | func NewExpvarProvider() Provider {
FILE: metrics/provider/graphite.go
type graphiteProvider (line 8) | type graphiteProvider struct
method NewCounter (line 24) | func (p *graphiteProvider) NewCounter(name string) metrics.Counter {
method NewGauge (line 29) | func (p *graphiteProvider) NewGauge(name string) metrics.Gauge {
method NewHistogram (line 34) | func (p *graphiteProvider) NewHistogram(name string, buckets int) metr...
method Stop (line 39) | func (p *graphiteProvider) Stop() {
function NewGraphiteProvider (line 16) | func NewGraphiteProvider(g *graphite.Graphite, stop func()) Provider {
FILE: metrics/provider/influx.go
type influxProvider (line 8) | type influxProvider struct
method NewCounter (line 23) | func (p *influxProvider) NewCounter(name string) metrics.Counter {
method NewGauge (line 28) | func (p *influxProvider) NewGauge(name string) metrics.Gauge {
method NewHistogram (line 33) | func (p *influxProvider) NewHistogram(name string, buckets int) metric...
method Stop (line 38) | func (p *influxProvider) Stop() {
function NewInfluxProvider (line 15) | func NewInfluxProvider(in *influx.Influx, stop func()) Provider {
FILE: metrics/provider/prometheus.go
type prometheusProvider (line 10) | type prometheusProvider struct
method NewCounter (line 28) | func (p *prometheusProvider) NewCounter(name string) metrics.Counter {
method NewGauge (line 40) | func (p *prometheusProvider) NewGauge(name string) metrics.Gauge {
method NewHistogram (line 53) | func (p *prometheusProvider) NewHistogram(name string, _ int) metrics....
method Stop (line 63) | func (p *prometheusProvider) Stop() {}
function NewPrometheusProvider (line 17) | func NewPrometheusProvider(namespace, subsystem string) Provider {
FILE: metrics/provider/provider.go
type Provider (line 37) | type Provider interface
FILE: metrics/provider/statsd.go
type statsdProvider (line 8) | type statsdProvider struct
method NewCounter (line 24) | func (p *statsdProvider) NewCounter(name string) metrics.Counter {
method NewGauge (line 29) | func (p *statsdProvider) NewGauge(name string) metrics.Gauge {
method NewHistogram (line 36) | func (p *statsdProvider) NewHistogram(name string, _ int) metrics.Hist...
method Stop (line 41) | func (p *statsdProvider) Stop() {
function NewStatsdProvider (line 16) | func NewStatsdProvider(s *statsd.Statsd, stop func()) Provider {
FILE: metrics/statsd/statsd.go
type Statsd (line 34) | type Statsd struct
method NewCounter (line 65) | func (s *Statsd) NewCounter(name string, sampleRate float64) *Counter {
method NewGauge (line 74) | func (s *Statsd) NewGauge(name string) *Gauge {
method NewTiming (line 84) | func (s *Statsd) NewTiming(name string, sampleRate float64) *Timing {
method WriteLoop (line 96) | func (s *Statsd) WriteLoop(ctx context.Context, c <-chan time.Time, w ...
method SendLoop (line 114) | func (s *Statsd) SendLoop(ctx context.Context, c <-chan time.Time, net...
method WriteTo (line 122) | func (s *Statsd) WriteTo(w io.Writer) (count int64, err error) {
function New (line 53) | func New(prefix string, logger log.Logger) *Statsd {
function sum (line 167) | func sum(a []float64) float64 {
function last (line 175) | func last(a []float64) float64 {
function sampling (line 179) | func sampling(r float64) string {
type observeFunc (line 187) | type observeFunc
type Counter (line 191) | type Counter struct
method With (line 197) | func (c *Counter) With(...string) metrics.Counter {
method Add (line 202) | func (c *Counter) Add(delta float64) {
type Gauge (line 208) | type Gauge struct
method With (line 215) | func (g *Gauge) With(...string) metrics.Gauge {
method Set (line 220) | func (g *Gauge) Set(value float64) {
method Add (line 225) | func (g *Gauge) Add(delta float64) {
type Timing (line 232) | type Timing struct
method With (line 238) | func (t *Timing) With(...string) metrics.Histogram {
method Observe (line 243) | func (t *Timing) Observe(value float64) {
FILE: metrics/statsd/statsd_test.go
function TestCounter (line 10) | func TestCounter(t *testing.T) {
function TestCounterSampled (line 22) | func TestCounterSampled(t *testing.T) {
function TestGauge (line 29) | func TestGauge(t *testing.T) {
function TestTiming (line 44) | func TestTiming(t *testing.T) {
function TestTimingSampled (line 56) | func TestTimingSampled(t *testing.T) {
FILE: metrics/teststat/buffers.go
function SumLines (line 16) | func SumLines(w io.WriterTo, regex string) func() float64 {
function LastLine (line 26) | func LastLine(w io.WriterTo, regex string) func() []float64 {
function Quantiles (line 38) | func Quantiles(w io.WriterTo, regex string, buckets int) func() (float64...
function stats (line 46) | func stats(w io.WriterTo, regex string, h *generic.Histogram) (sum, fina...
FILE: metrics/teststat/populate.go
function PopulateNormalHistogram (line 18) | func PopulateNormalHistogram(h metrics.Histogram, seed int) {
function normalQuantiles (line 29) | func normalQuantiles() (p50, p90, p95, p99 float64) {
function nvq (line 33) | func nvq(quantile int) float64 {
function erfinv (line 38) | func erfinv(y float64) float64 {
FILE: metrics/teststat/teststat.go
function TestCounter (line 18) | func TestCounter(counter metrics.Counter, value func() float64) error {
function FillCounter (line 28) | func FillCounter(counter metrics.Counter) float64 {
function TestGauge (line 43) | func TestGauge(gauge metrics.Gauge, value func() []float64) error {
function TestHistogram (line 83) | func TestHistogram(histogram metrics.Histogram, quantiles func() (p50, p...
function ExpectedObservationsLessThan (line 123) | func ExpectedObservationsLessThan(bucket int64) int64 {
function cmp (line 129) | func cmp(want, have, tol float64) bool {
FILE: metrics/timer.go
type Timer (line 7) | type Timer struct
method ObserveDuration (line 24) | func (t *Timer) ObserveDuration() {
method Unit (line 34) | func (t *Timer) Unit(u time.Duration) {
function NewTimer (line 14) | func NewTimer(h Histogram) *Timer {
FILE: metrics/timer_test.go
function TestTimerFast (line 13) | func TestTimerFast(t *testing.T) {
function TestTimerSlow (line 23) | func TestTimerSlow(t *testing.T) {
function TestTimerUnit (line 35) | func TestTimerUnit(t *testing.T) {
FILE: ratelimit/token_bucket.go
type Allower (line 17) | type Allower interface
function NewErroringLimiter (line 24) | func NewErroringLimiter(limit Allower) endpoint.Middleware {
type Waiter (line 38) | type Waiter interface
function NewDelayingLimiter (line 45) | func NewDelayingLimiter(limit Waiter) endpoint.Middleware {
type AllowerFunc (line 58) | type AllowerFunc
method Allow (line 61) | func (f AllowerFunc) Allow() bool {
type WaiterFunc (line 67) | type WaiterFunc
method Wait (line 70) | func (f WaiterFunc) Wait(ctx context.Context) error {
FILE: ratelimit/token_bucket_test.go
function TestXRateErroring (line 17) | func TestXRateErroring(t *testing.T) {
function TestXRateDelaying (line 25) | func TestXRateDelaying(t *testing.T) {
function testSuccessThenFailure (line 33) | func testSuccessThenFailure(t *testing.T, e endpoint.Endpoint, failConta...
FILE: sd/benchmark_test.go
function BenchmarkEndpoints (line 11) | func BenchmarkEndpoints(b *testing.B) {
FILE: sd/consul/client.go
type Client (line 8) | type Client interface
type client (line 19) | type client struct
method Register (line 29) | func (c *client) Register(r *consul.AgentServiceRegistration) error {
method Deregister (line 33) | func (c *client) Deregister(r *consul.AgentServiceRegistration) error {
method Service (line 37) | func (c *client) Service(service, tag string, passingOnly bool, queryO...
function NewClient (line 25) | func NewClient(c *consul.Client) Client {
FILE: sd/consul/client_test.go
function TestClientRegistration (line 15) | func TestClientRegistration(t *testing.T) {
type testClient (line 59) | type testClient struct
method Service (line 71) | func (c *testClient) Service(service, tag string, _ bool, opts *stdcon...
method Register (line 96) | func (c *testClient) Register(r *stdconsul.AgentServiceRegistration) e...
method Deregister (line 109) | func (c *testClient) Deregister(r *stdconsul.AgentServiceRegistration)...
function newTestClient (line 63) | func newTestClient(entries []*stdconsul.ServiceEntry) *testClient {
function registration2entry (line 127) | func registration2entry(r *stdconsul.AgentServiceRegistration) *stdconsu...
function testFactory (line 144) | func testFactory(instance string) (endpoint.Endpoint, io.Closer, error) {
FILE: sd/consul/instancer.go
constant defaultIndex (line 16) | defaultIndex = 0
type Instancer (line 22) | type Instancer struct
method Stop (line 59) | func (s *Instancer) Stop() {
method loop (line 63) | func (s *Instancer) loop(lastIndex uint64) {
method getInstances (line 97) | func (s *Instancer) getInstances(lastIndex uint64, interruptc chan str...
method Register (line 147) | func (s *Instancer) Register(ch chan<- sd.Event) {
method Deregister (line 152) | func (s *Instancer) Deregister(ch chan<- sd.Event) {
function NewInstancer (line 35) | func NewInstancer(client Client, logger log.Logger, service string, tags...
function filterEntries (line 156) | func filterEntries(entries []*consul.ServiceEntry, tags ...string) []*co...
function makeInstances (line 177) | func makeInstances(entries []*consul.ServiceEntry) []string {
FILE: sd/consul/instancer_test.go
function TestInstancer (line 66) | func TestInstancer(t *testing.T) {
function TestInstancerNoService (line 81) | func TestInstancerNoService(t *testing.T) {
function TestInstancerWithTags (line 96) | func TestInstancerWithTags(t *testing.T) {
function TestInstancerAddressOverride (line 111) | func TestInstancerAddressOverride(t *testing.T) {
type eofTestClient (line 138) | type eofTestClient struct
method Register (line 148) | func (c *eofTestClient) Register(r *consul.AgentServiceRegistration) e...
method Deregister (line 152) | func (c *eofTestClient) Deregister(r *consul.AgentServiceRegistration)...
method Service (line 156) | func (c *eofTestClient) Service(service, tag string, passingOnly bool,...
function neweofTestClient (line 144) | func neweofTestClient(client *testClient, sig chan bool, called chan str...
function TestInstancerWithEOF (line 165) | func TestInstancerWithEOF(t *testing.T) {
type badIndexTestClient (line 208) | type badIndexTestClient struct
method Register (line 217) | func (c *badIndexTestClient) Register(r *consul.AgentServiceRegistrati...
method Deregister (line 221) | func (c *badIndexTestClient) Deregister(r *consul.AgentServiceRegistra...
method Service (line 225) | func (c *badIndexTestClient) Service(service, tag string, passingOnly ...
function newBadIndexTestClient (line 213) | func newBadIndexTestClient(client *testClient, called chan struct{}) Cli...
function TestInstancerWithInvalidIndex (line 237) | func TestInstancerWithInvalidIndex(t *testing.T) {
type indexTestClient (line 266) | type indexTestClient struct
method Register (line 280) | func (i *indexTestClient) Register(r *consul.AgentServiceRegistration)...
method Deregister (line 284) | func (i *indexTestClient) Deregister(r *consul.AgentServiceRegistratio...
method Service (line 288) | func (i *indexTestClient) Service(service, tag string, passingOnly boo...
function newIndexTestClient (line 272) | func newIndexTestClient(c *testClient, errs chan error) *indexTestClient {
function TestInstancerLoopIndex (line 308) | func TestInstancerLoopIndex(t *testing.T) {
FILE: sd/consul/integration_test.go
function TestIntegration (line 18) | func TestIntegration(t *testing.T) {
FILE: sd/consul/registrar.go
type Registrar (line 12) | type Registrar struct
method Register (line 29) | func (p *Registrar) Register() {
method Deregister (line 38) | func (p *Registrar) Deregister() {
function NewRegistrar (line 20) | func NewRegistrar(client Client, r *stdconsul.AgentServiceRegistration, ...
FILE: sd/consul/registrar_test.go
function TestRegistrar (line 11) | func TestRegistrar(t *testing.T) {
FILE: sd/dnssrv/instancer.go
type Instancer (line 21) | type Instancer struct
method Stop (line 66) | func (in *Instancer) Stop() {
method loop (line 70) | func (in *Instancer) loop(t *time.Ticker, lookup Lookup) {
method resolve (line 89) | func (in *Instancer) resolve(lookup Lookup) ([]string, error) {
method Register (line 105) | func (in *Instancer) Register(ch chan<- sd.Event) {
method Deregister (line 110) | func (in *Instancer) Deregister(ch chan<- sd.Event) {
function NewInstancer (line 29) | func NewInstancer(
function NewInstancerDetailed (line 40) | func NewInstancerDetailed(
FILE: sd/dnssrv/instancer_test.go
function TestRefresh (line 15) | func TestRefresh(t *testing.T) {
function TestIssue892 (line 71) | func TestIssue892(t *testing.T) {
type nopCloser (line 98) | type nopCloser struct
method Close (line 100) | func (nopCloser) Close() error { return nil }
FILE: sd/dnssrv/lookup.go
type Lookup (line 7) | type Lookup
FILE: sd/endpoint_cache.go
type endpointCache (line 16) | type endpointCache struct
method Update (line 48) | func (c *endpointCache) Update(event Event) {
method updateCache (line 73) | func (c *endpointCache) updateCache(instances []string) {
method Endpoints (line 120) | func (c *endpointCache) Endpoints() ([]endpoint.Endpoint, error) {
type endpointCloser (line 28) | type endpointCloser struct
function newEndpointCache (line 34) | func newEndpointCache(factory Factory, logger log.Logger, options endpoi...
FILE: sd/endpoint_cache_test.go
function TestEndpointCache (line 13) | func TestEndpointCache(t *testing.T) {
function TestEndpointCacheErrorAndTimeout (line 82) | func TestEndpointCacheErrorAndTimeout(t *testing.T) {
function TestBadFactory (line 143) | func TestBadFactory(t *testing.T) {
function assertEndpointsLen (line 152) | func assertEndpointsLen(t *testing.T, cache *endpointCache, l int) {
function assertEndpointsError (line 163) | func assertEndpointsError(t *testing.T, cache *endpointCache, wantErr st...
type closer (line 178) | type closer
method Close (line 180) | func (c closer) Close() error { close(c); return nil }
FILE: sd/endpointer.go
type Endpointer (line 14) | type Endpointer interface
type FixedEndpointer (line 19) | type FixedEndpointer
method Endpoints (line 22) | func (s FixedEndpointer) Endpoints() ([]endpoint.Endpoint, error) { re...
function NewEndpointer (line 28) | func NewEndpointer(src Instancer, f Factory, logger log.Logger, options ...
type EndpointerOption (line 44) | type EndpointerOption
function InvalidateOnError (line 53) | func InvalidateOnError(timeout time.Duration) EndpointerOption {
type endpointerOptions (line 60) | type endpointerOptions struct
type DefaultEndpointer (line 69) | type DefaultEndpointer struct
method receive (line 75) | func (de *DefaultEndpointer) receive() {
method Close (line 82) | func (de *DefaultEndpointer) Close() {
method Endpoints (line 88) | func (de *DefaultEndpointer) Endpoints() ([]endpoint.Endpoint, error) {
FILE: sd/endpointer_test.go
function TestDefaultEndpointer (line 14) | func TestDefaultEndpointer(t *testing.T) {
type mockInstancer (line 70) | type mockInstancer struct
type closer (line 72) | type closer
method Close (line 74) | func (c closer) Close() error { close(c); return nil }
function within (line 76) | func within(d time.Duration, f func() bool) bool {
FILE: sd/etcd/client.go
type Client (line 25) | type Client interface
type client (line 47) | type client struct
method GetEntries (line 120) | func (c *client) GetEntries(key string) ([]string, error) {
method WatchPrefix (line 141) | func (c *client) WatchPrefix(prefix string, ch chan struct{}) {
method Register (line 152) | func (c *client) Register(s Service) error {
method Deregister (line 171) | func (c *client) Deregister(s Service) error {
type ClientOptions (line 54) | type ClientOptions struct
function NewClient (line 67) | func NewClient(ctx context.Context, machines []string, options ClientOpt...
FILE: sd/etcd/client_test.go
function TestNewClient (line 13) | func TestNewClient(t *testing.T) {
function TestOptions (line 32) | func TestOptions(t *testing.T) {
type fakeKeysAPI (line 73) | type fakeKeysAPI struct
method Get (line 85) | func (fka *fakeKeysAPI) Get(ctx context.Context, key string, opts *etc...
method Set (line 93) | func (fka *fakeKeysAPI) Set(ctx context.Context, key, value string, op...
method Delete (line 98) | func (fka *fakeKeysAPI) Delete(ctx context.Context, key string, opts *...
method Create (line 103) | func (fka *fakeKeysAPI) Create(ctx context.Context, key, value string)...
method CreateInOrder (line 108) | func (fka *fakeKeysAPI) CreateInOrder(ctx context.Context, dir, value ...
method Update (line 113) | func (fka *fakeKeysAPI) Update(ctx context.Context, key, value string)...
method Watcher (line 118) | func (fka *fakeKeysAPI) Watcher(key string, opts *etcd.WatcherOptions)...
type getResult (line 79) | type getResult struct
type fakeWatcher (line 123) | type fakeWatcher struct
method Next (line 131) | func (fw *fakeWatcher) Next(context.Context) (*etcd.Response, error) {
function newFakeClient (line 142) | func newFakeClient(event, err chan bool, getres *getResult) Client {
function TestRegisterClient (line 150) | func TestRegisterClient(t *testing.T) {
function TestDeregisterClient (line 170) | func TestDeregisterClient(t *testing.T) {
function TestWatchPrefix (line 186) | func TestWatchPrefix(t *testing.T) {
function TestGetEntries (line 300) | func TestGetEntries(t *testing.T) {
FILE: sd/etcd/example_test.go
function Example (line 14) | func Example() {
function barFactory (line 69) | func barFactory(string) (endpoint.Endpoint, io.Closer, error) { return e...
FILE: sd/etcd/instancer.go
type Instancer (line 11) | type Instancer struct
method loop (line 42) | func (s *Instancer) loop() {
method Stop (line 63) | func (s *Instancer) Stop() {
method Register (line 68) | func (s *Instancer) Register(ch chan<- sd.Event) {
method Deregister (line 73) | func (s *Instancer) Deregister(ch chan<- sd.Event) {
function NewInstancer (line 21) | func NewInstancer(c Client, prefix string, logger log.Logger) (*Instance...
FILE: sd/etcd/instancer_test.go
function TestInstancer (line 30) | func TestInstancer(t *testing.T) {
type fakeClient (line 46) | type fakeClient struct
method GetEntries (line 50) | func (c *fakeClient) GetEntries(prefix string) ([]string, error) {
method WatchPrefix (line 63) | func (c *fakeClient) WatchPrefix(prefix string, ch chan struct{}) {}
method Register (line 65) | func (c *fakeClient) Register(Service) error {
method Deregister (line 68) | func (c *fakeClient) Deregister(Service) error {
FILE: sd/etcd/integration_test.go
function TestIntegration (line 21) | func TestIntegration(t *testing.T) {
function within (line 116) | func within(d time.Duration, f func() bool) bool {
FILE: sd/etcd/registrar.go
constant minHeartBeatTime (line 12) | minHeartBeatTime = 500 * time.Millisecond
type Registrar (line 15) | type Registrar struct
method Register (line 72) | func (r *Registrar) Register() {
method loop (line 83) | func (r *Registrar) loop() {
method Deregister (line 107) | func (r *Registrar) Deregister() {
type Service (line 27) | type Service struct
type TTLOption (line 36) | type TTLOption struct
function NewTTLOption (line 47) | func NewTTLOption(heartbeat, ttl time.Duration) *TTLOption {
function NewRegistrar (line 62) | func NewRegistrar(client Client, service Service, logger log.Logger) *Re...
FILE: sd/etcd/registrar_test.go
type testClient (line 12) | type testClient struct
method GetEntries (line 16) | func (tc *testClient) GetEntries(prefix string) ([]string, error) {
method WatchPrefix (line 20) | func (tc *testClient) WatchPrefix(prefix string, ch chan struct{}) {
method Register (line 24) | func (tc *testClient) Register(s Service) error {
method Deregister (line 28) | func (tc *testClient) Deregister(s Service) error {
function TestNewRegistar (line 36) | func TestNewRegistar(t *testing.T) {
function TestRegister (line 67) | func TestRegister(t *testing.T) {
function TestDeregister (line 96) | func TestDeregister(t *testing.T) {
FILE: sd/etcdv3/client.go
type Client (line 23) | type Client interface
type client (line 48) | type client struct
method LeaseID (line 133) | func (c *client) LeaseID() int64 { return int64(c.leaseID) }
method GetEntries (line 136) | func (c *client) GetEntries(key string) ([]string, error) {
method WatchPrefix (line 151) | func (c *client) WatchPrefix(prefix string, ch chan struct{}) {
method Register (line 165) | func (c *client) Register(s Service) error {
method Deregister (line 234) | func (c *client) Deregister(s Service) error {
method close (line 249) | func (c *client) close() {
type ClientOptions (line 71) | type ClientOptions struct
function NewClient (line 89) | func NewClient(ctx context.Context, machines []string, options ClientOpt...
FILE: sd/etcdv3/client_test.go
constant irrelevantEndpoint (line 13) | irrelevantEndpoint = "http://irrelevant:12345"
function TestNewClient (line 16) | func TestNewClient(t *testing.T) {
function TestClientOptions (line 33) | func TestClientOptions(t *testing.T) {
FILE: sd/etcdv3/example_test.go
function Example (line 15) | func Example() {
function barFactory (line 96) | func barFactory(string) (endpoint.Endpoint, io.Closer, error) { return e...
FILE: sd/etcdv3/instancer.go
type Instancer (line 11) | type Instancer struct
method loop (line 42) | func (s *Instancer) loop() {
method Stop (line 64) | func (s *Instancer) Stop() {
method Register (line 69) | func (s *Instancer) Register(ch chan<- sd.Event) {
method Deregister (line 74) | func (s *Instancer) Deregister(ch chan<- sd.Event) {
function NewInstancer (line 21) | func NewInstancer(c Client, prefix string, logger log.Logger) (*Instance...
FILE: sd/etcdv3/instancer_test.go
type testKV (line 13) | type testKV struct
type testResponse (line 18) | type testResponse struct
function TestInstancer (line 39) | func TestInstancer(t *testing.T) {
type fakeClient (line 55) | type fakeClient struct
method GetEntries (line 59) | func (c *fakeClient) GetEntries(prefix string) ([]string, error) {
method WatchPrefix (line 72) | func (c *fakeClient) WatchPrefix(prefix string, ch chan struct{}) {
method LeaseID (line 75) | func (c *fakeClient) LeaseID() int64 {
method Register (line 79) | func (c *fakeClient) Register(Service) error {
method Deregister (line 82) | func (c *fakeClient) Deregister(Service) error {
FILE: sd/etcdv3/integration_test.go
function runIntegration (line 18) | func runIntegration(settings integrationSettings, client Client, service...
type integrationSettings (line 103) | type integrationSettings struct
function testIntegrationSettings (line 111) | func testIntegrationSettings(t *testing.T) integrationSettings {
function TestIntegration (line 130) | func TestIntegration(t *testing.T) {
function TestIntegrationTTL (line 148) | func TestIntegrationTTL(t *testing.T) {
function TestIntegrationRegistrarOnly (line 168) | func TestIntegrationRegistrarOnly(t *testing.T) {
function within (line 212) | func within(d time.Duration, f func() bool) bool {
FILE: sd/etcdv3/registrar.go
constant minHeartBeatTime (line 10) | minHeartBeatTime = 500 * time.Millisecond
type Registrar (line 13) | type Registrar struct
method Register (line 69) | func (r *Registrar) Register() {
method Deregister (line 83) | func (r *Registrar) Deregister() {
type Service (line 25) | type Service struct
type TTLOption (line 33) | type TTLOption struct
function NewTTLOption (line 44) | func NewTTLOption(heartbeat, ttl time.Duration) *TTLOption {
function NewRegistrar (line 59) | func NewRegistrar(client Client, service Service, logger log.Logger) *Re...
FILE: sd/etcdv3/registrar_test.go
type testClient (line 12) | type testClient struct
method GetEntries (line 16) | func (tc *testClient) GetEntries(prefix string) ([]string, error) {
method WatchPrefix (line 20) | func (tc *testClient) WatchPrefix(prefix string, ch chan struct{}) {
method Register (line 23) | func (tc *testClient) Register(s Service) error {
method Deregister (line 27) | func (tc *testClient) Deregister(s Service) error {
method LeaseID (line 31) | func (tc *testClient) LeaseID() int64 {
function TestNewRegistar (line 43) | func TestNewRegistar(t *testing.T) {
function TestRegister (line 61) | func TestRegister(t *testing.T) {
function TestDeregister (line 91) | func TestDeregister(t *testing.T) {
FILE: sd/eureka/instancer.go
type Instancer (line 15) | type Instancer struct
method Stop (line 44) | func (s *Instancer) Stop() {
method consume (line 51) | func (s *Instancer) consume(update fargo.AppUpdate) {
method loop (line 62) | func (s *Instancer) loop(updates <-chan fargo.AppUpdate, done chan<- s...
method getInstances (line 76) | func (s *Instancer) getInstances() ([]string, error) {
method Register (line 93) | func (s *Instancer) Register(ch chan<- sd.Event) {
method Deregister (line 98) | func (s *Instancer) Deregister(ch chan<- sd.Event) {
method state (line 103) | func (s *Instancer) state() sd.Event {
function NewInstancer (line 25) | func NewInstancer(conn fargoConnection, app string, logger log.Logger) *...
function convertFargoAppToInstances (line 84) | func convertFargoAppToInstances(app *fargo.Application) []string {
FILE: sd/eureka/instancer_test.go
function TestInstancer (line 14) | func TestInstancer(t *testing.T) {
function TestInstancerReceivesUpdates (line 33) | func TestInstancerReceivesUpdates(t *testing.T) {
function TestBadInstancerScheduleUpdates (line 75) | func TestBadInstancerScheduleUpdates(t *testing.T) {
FILE: sd/eureka/integration_test.go
function TestIntegration (line 25) | func TestIntegration(t *testing.T) {
FILE: sd/eureka/registrar.go
constant defaultRenewalInterval (line 16) | defaultRenewalInterval = 30 * time.Second
type fargoConnection (line 19) | type fargoConnection interface
type fargoUnsuccessfulHTTPResponse (line 28) | type fargoUnsuccessfulHTTPResponse struct
method Error (line 33) | func (u *fargoUnsuccessfulHTTPResponse) Error() string {
type Registrar (line 38) | type Registrar struct
method Register (line 59) | func (r *Registrar) Register() {
method Deregister (line 76) | func (r *Registrar) Deregister() {
method loop (line 90) | func (r *Registrar) loop() {
method heartbeat (line 133) | func (r *Registrar) heartbeat() error {
function NewRegistrar (line 50) | func NewRegistrar(conn fargoConnection, instance *fargo.Instance, logger...
function httpResponseStatusCode (line 117) | func httpResponseStatusCode(err error) (code int, present bool) {
function isNotFound (line 128) | func isNotFound(err error) bool {
FILE: sd/eureka/registrar_test.go
function TestRegistrar (line 8) | func TestRegistrar(t *testing.T) {
function TestBadRegister (line 60) | func TestBadRegister(t *testing.T) {
function TestBadDeregister (line 72) | func TestBadDeregister(t *testing.T) {
function TestExpiredInstance (line 88) | func TestExpiredInstance(t *testing.T) {
FILE: sd/eureka/util_test.go
type testConnection (line 14) | type testConnection struct
method RegisterInstance (line 60) | func (c *testConnection) RegisterInstance(i *fargo.Instance) error {
method HeartBeatInstance (line 75) | func (c *testConnection) HeartBeatInstance(i *fargo.Instance) error {
method DeregisterInstance (line 79) | func (c *testConnection) DeregisterInstance(i *fargo.Instance) error {
method ReregisterInstance (line 99) | func (c *testConnection) ReregisterInstance(ins *fargo.Instance) error {
method instancesForApplication (line 103) | func (c *testConnection) instancesForApplication(name string) []*fargo...
method GetApp (line 115) | func (c *testConnection) GetApp(name string) (*fargo.Application, erro...
method ScheduleAppUpdates (line 126) | func (c *testConnection) ScheduleAppUpdates(name string, await bool, d...
FILE: sd/factory.go
type Factory (line 17) | type Factory
FILE: sd/instancer.go
type Event (line 12) | type Event struct
type Instancer (line 22) | type Instancer interface
type FixedInstancer (line 29) | type FixedInstancer
method Register (line 32) | func (d FixedInstancer) Register(ch chan<- Event) { ch <- Event{Instan...
method Deregister (line 35) | func (d FixedInstancer) Deregister(ch chan<- Event) {}
method Stop (line 38) | func (d FixedInstancer) Stop() {}
FILE: sd/internal/instance/cache.go
type Cache (line 13) | type Cache struct
method Update (line 28) | func (c *Cache) Update(event sd.Event) {
method State (line 42) | func (c *Cache) State() sd.Event {
method Stop (line 52) | func (c *Cache) Stop() {}
method Register (line 55) | func (c *Cache) Register(ch chan<- sd.Event) {
method Deregister (line 66) | func (c *Cache) Deregister(ch chan<- sd.Event) {
function NewCache (line 20) | func NewCache() *Cache {
type registry (line 73) | type registry
method broadcast (line 75) | func (r registry) broadcast(event sd.Event) {
method register (line 82) | func (r registry) register(c chan<- sd.Event) {
method deregister (line 86) | func (r registry) deregister(c chan<- sd.Event) {
function copyEvent (line 91) | func copyEvent(e sd.Event) sd.Event {
FILE: sd/internal/instance/cache_test.go
function TestCache (line 24) | func TestCache(t *testing.T) {
function expectUpdate (line 49) | func expectUpdate(t *testing.T, r chan sd.Event, expect []string) {
function TestRegistry (line 60) | func TestRegistry(t *testing.T) {
function TestDataRace (line 88) | func TestDataRace(t *testing.T) {
FILE: sd/lb/balancer.go
type Balancer (line 10) | type Balancer interface
FILE: sd/lb/random.go
function NewRandom (line 11) | func NewRandom(s sd.Endpointer, seed int64) Balancer {
type random (line 18) | type random struct
method Endpoint (line 23) | func (r *random) Endpoint() (endpoint.Endpoint, error) {
FILE: sd/lb/random_test.go
function TestRandom (line 12) | func TestRandom(t *testing.T) {
function TestRandomNoEndpoints (line 44) | func TestRandomNoEndpoints(t *testing.T) {
FILE: sd/lb/retry.go
type RetryError (line 14) | type RetryError struct
method Error (line 19) | func (e RetryError) Error() string {
type Callback (line 37) | type Callback
function Retry (line 44) | func Retry(max int, timeout time.Duration, b Balancer) endpoint.Endpoint {
function maxRetries (line 48) | func maxRetries(max int) Callback {
function alwaysRetry (line 54) | func alwaysRetry(int, error) (keepTrying bool, replacement error) {
function RetryWithCallback (line 64) | func RetryWithCallback(timeout time.Duration, b Balancer, cb Callback) e...
FILE: sd/lb/retry_test.go
function TestRetryMaxTotalFail (line 14) | func TestRetryMaxTotalFail(t *testing.T) {
function TestRetryMaxPartialFail (line 26) | func TestRetryMaxPartialFail(t *testing.T) {
function TestRetryMaxSuccess (line 47) | func TestRetryMaxSuccess(t *testing.T) {
function TestRetryTimeout (line 68) | func TestRetryTimeout(t *testing.T) {
function TestAbortEarlyCustomMessage (line 91) | func TestAbortEarlyCustomMessage(t *testing.T) {
function TestErrorPassedUnchangedToCallback (line 106) | func TestErrorPassedUnchangedToCallback(t *testing.T) {
function TestHandleNilCallback (line 129) | func TestHandleNilCallback(t *testing.T) {
FILE: sd/lb/round_robin.go
function NewRoundRobin (line 11) | func NewRoundRobin(s sd.Endpointer) Balancer {
type roundRobin (line 18) | type roundRobin struct
method Endpoint (line 23) | func (rr *roundRobin) Endpoint() (endpoint.Endpoint, error) {
FILE: sd/lb/round_robin_test.go
function TestRoundRobin (line 15) | func TestRoundRobin(t *testing.T) {
function TestRoundRobinNoEndpoints (line 48) | func TestRoundRobinNoEndpoints(t *testing.T) {
function TestRoundRobinNoRace (line 57) | func TestRoundRobinNoRace(t *testing.T) {
FILE: sd/registrar.go
type Registrar (line 10) | type Registrar interface
FILE: sd/zk/client.go
constant DefaultConnectTimeout (line 26) | DefaultConnectTimeout = 2 * time.Second
constant DefaultSessionTimeout (line 29) | DefaultSessionTimeout = 5 * time.Second
type Client (line 33) | type Client interface
type clientConfig (line 48) | type clientConfig struct
type Option (line 59) | type Option
type client (line 61) | type client struct
method CreateParentNodes (line 185) | func (c *client) CreateParentNodes(path string) error {
method GetEntries (line 214) | func (c *client) GetEntries(path string) ([]string, <-chan zk.Event, e...
method Register (line 233) | func (c *client) Register(s *Service) error {
method Deregister (line 253) | func (c *client) Deregister(s *Service) error {
method Stop (line 272) | func (c *client) Stop() {
function ACL (line 69) | func ACL(acl []zk.ACL) Option {
function Credentials (line 78) | func Credentials(user, pass string) Option {
function ConnectTimeout (line 90) | func ConnectTimeout(t time.Duration) Option {
function SessionTimeout (line 101) | func SessionTimeout(t time.Duration) Option {
function Payload (line 113) | func Payload(payload [][]byte) Option {
function EventHandler (line 122) | func EventHandler(handler func(zk.Event)) Option {
function NewClient (line 131) | func NewClient(servers []string, logger log.Logger, options ...Option) (...
FILE: sd/zk/client_test.go
function TestNewClient (line 13) | func TestNewClient(t *testing.T) {
function TestOptions (line 77) | func TestOptions(t *testing.T) {
function TestCreateParentNodes (line 99) | func TestCreateParentNodes(t *testing.T) {
FILE: sd/zk/instancer.go
type Instancer (line 13) | type Instancer struct
method loop (line 51) | func (s *Instancer) loop(eventc <-chan zk.Event) {
method Stop (line 78) | func (s *Instancer) Stop() {
method Register (line 83) | func (s *Instancer) Register(ch chan<- sd.Event) {
method Deregister (line 88) | func (s *Instancer) Deregister(ch chan<- sd.Event) {
method state (line 93) | func (s *Instancer) state() sd.Event {
function NewInstancer (line 23) | func NewInstancer(c Client, path string, logger log.Logger) (*Instancer,...
FILE: sd/zk/instancer_test.go
function TestInstancer (line 12) | func TestInstancer(t *testing.T) {
function TestBadFactory (line 27) | func TestBadFactory(t *testing.T) {
function TestServiceUpdate (line 48) | func TestServiceUpdate(t *testing.T) {
function TestBadInstancerCreate (line 107) | func TestBadInstancerCreate(t *testing.T) {
FILE: sd/zk/integration_test.go
function TestMain (line 18) | func TestMain(m *testing.M) {
function TestCreateParentNodesOnServer (line 26) | func TestCreateParentNodesOnServer(t *testing.T) {
function TestCreateBadParentNodesOnServer (line 71) | func TestCreateBadParentNodesOnServer(t *testing.T) {
function TestCredentials1 (line 85) | func TestCredentials1(t *testing.T) {
function TestCredentials2 (line 100) | func TestCredentials2(t *testing.T) {
function TestConnection (line 115) | func TestConnection(t *testing.T) {
function TestGetEntriesOnServer (line 129) | func TestGetEntriesOnServer(t *testing.T) {
function TestGetEntriesPayloadOnServer (line 177) | func TestGetEntriesPayloadOnServer(t *testing.T) {
FILE: sd/zk/logwrapper.go
type wrapLogger (line 13) | type wrapLogger struct
method Printf (line 17) | func (logger wrapLogger) Printf(format string, args ...interface{}) {
function withLogger (line 23) | func withLogger(logger log.Logger) func(c *zk.Conn) {
FILE: sd/zk/registrar.go
type Registrar (line 6) | type Registrar struct
method Register (line 36) | func (r *Registrar) Register() {
method Deregister (line 45) | func (r *Registrar) Deregister() {
type Service (line 14) | type Service struct
function NewRegistrar (line 23) | func NewRegistrar(client Client, service Service, logger log.Logger) *Re...
FILE: sd/zk/util_test.go
type fakeClient (line 22) | type fakeClient struct
method CreateParentNodes (line 37) | func (c *fakeClient) CreateParentNodes(path string) error {
method GetEntries (line 44) | func (c *fakeClient) GetEntries(path string) ([]string, <-chan zk.Even...
method AddService (line 58) | func (c *fakeClient) AddService(node, data string) {
method RemoveService (line 65) | func (c *fakeClient) RemoveService(node string) {
method Register (line 72) | func (c *fakeClient) Register(s *Service) error {
method Deregister (line 76) | func (c *fakeClient) Deregister(s *Service) error {
method SendErrorOnWatch (line 80) | func (c *fakeClient) SendErrorOnWatch() {
method ErrorIsConsumedWithin (line 87) | func (c *fakeClient) ErrorIsConsumedWithin(timeout time.Duration) error {
method Stop (line 104) | func (c *fakeClient) Stop() {}
function newFakeClient (line 29) | func newFakeClient() *fakeClient {
function newFactory (line 106) | func newFactory(fakeError string) sd.Factory {
function asyncTest (line 115) | func asyncTest(timeout time.Duration, want int, s sd.Endpointer) (err er...
FILE: tracing/opencensus/endpoint.go
constant TraceEndpointDefaultName (line 14) | TraceEndpointDefaultName = "gokit/endpoint"
function TraceEndpoint (line 21) | func TraceEndpoint(name string, options ...EndpointOption) endpoint.Midd...
FILE: tracing/opencensus/endpoint_options.go
type EndpointOptions (line 10) | type EndpointOptions struct
type EndpointOption (line 32) | type EndpointOption
function WithEndpointConfig (line 36) | func WithEndpointConfig(options EndpointOptions) EndpointOption {
function WithEndpointAttributes (line 44) | func WithEndpointAttributes(attrs ...trace.Attribute) EndpointOption {
function WithIgnoreBusinessError (line 52) | func WithIgnoreBusinessError(val bool) EndpointOption {
function WithSpanName (line 59) | func WithSpanName(fn func(ctx context.Context, name string) string) Endp...
function WithSpanAttributes (line 66) | func WithSpanAttributes(fn func(ctx context.Context) []trace.Attribute) ...
FILE: tracing/opencensus/endpoint_test.go
constant span1 (line 18) | span1 = ""
constant span2 (line 19) | span2 = "SPAN-2"
constant span3 (line 20) | span3 = "SPAN-3"
constant span4 (line 21) | span4 = "SPAN-4"
constant span5 (line 22) | span5 = "SPAN-5"
constant span6 (line 23) | span6 = "SPAN-6"
type failedResponse (line 36) | type failedResponse struct
method Failed (line 40) | func (r failedResponse) Failed() error { return r.err }
function passEndpoint (line 42) | func passEndpoint(_ context.Context, req interface{}) (interface{}, erro...
function TestTraceEndpoint (line 49) | func TestTraceEndpoint(t *testing.T) {
FILE: tracing/opencensus/grpc.go
constant propagationKey (line 15) | propagationKey = "grpc-trace-bin"
function GRPCClientTrace (line 18) | func GRPCClientTrace(options ...TracerOption) kitgrpc.ClientOption {
function GRPCServerTrace (line 71) | func GRPCServerTrace(options ...TracerOption) kitgrpc.ServerOption {
FILE: tracing/opencensus/grpc_test.go
type dummy (line 19) | type dummy struct
constant traceContextKey (line 21) | traceContextKey = "grpc-trace-bin"
function unaryInterceptor (line 23) | func unaryInterceptor(
function TestGRPCClientTrace (line 30) | func TestGRPCClientTrace(t *testing.T) {
function TestGRPCServerTrace (line 112) | func TestGRPCServerTrace(t *testing.T) {
FILE: tracing/opencensus/http.go
function HTTPClientTrace (line 15) | func HTTPClientTrace(options ...TracerOption) kithttp.ClientOption {
function HTTPServerTrace (line 93) | func HTTPServerTrace(options ...TracerOption) kithttp.ServerOption {
FILE: tracing/opencensus/http_test.go
function TestHTTPClientTrace (line 22) | func TestHTTPClientTrace(t *testing.T) {
function TestHTTPServerTrace (line 97) | func TestHTTPServerTrace(t *testing.T) {
FILE: tracing/opencensus/jsonrpc.go
function JSONRPCClientTrace (line 16) | func JSONRPCClientTrace(options ...TracerOption) jsonrpc.ClientOption {
function JSONRPCServerTrace (line 94) | func JSONRPCServerTrace(options ...TracerOption) jsonrpc.ServerOption {
FILE: tracing/opencensus/jsonrpc_test.go
function TestJSONRPCClientTrace (line 25) | func TestJSONRPCClientTrace(t *testing.T) {
function TestJSONRPCServerTrace (line 103) | func TestJSONRPCServerTrace(t *testing.T) {
FILE: tracing/opencensus/opencensus_test.go
type recordingExporter (line 9) | type recordingExporter struct
method ExportSpan (line 14) | func (e *recordingExporter) ExportSpan(d *trace.SpanData) {
method Flush (line 21) | func (e *recordingExporter) Flush() (data []*trace.SpanData) {
FILE: tracing/opencensus/tracer_options.go
type TracerOption (line 15) | type TracerOption
function WithTracerConfig (line 18) | func WithTracerConfig(options TracerOptions) TracerOption {
function WithSampler (line 25) | func WithSampler(sampler trace.Sampler) TracerOption {
function WithName (line 34) | func WithName(name string) TracerOption {
function IsPublic (line 45) | func IsPublic(isPublic bool) TracerOption {
function WithHTTPPropagation (line 53) | func WithHTTPPropagation(p propagation.HTTPFormat) TracerOption {
type TracerOptions (line 65) | type TracerOptions struct
FILE: tracing/opentracing/endpoint.go
function TraceEndpoint (line 20) | func TraceEndpoint(tracer opentracing.Tracer, operationName string, opts...
function TraceServer (line 102) | func TraceServer(tracer opentracing.Tracer, operationName string, opts ....
function TraceClient (line 112) | func TraceClient(tracer opentracing.Tracer, operationName string, opts ....
function applyTags (line 120) | func applyTags(span opentracing.Span, tags opentracing.Tags) {
FILE: tracing/opentracing/endpoint_options.go
type EndpointOptions (line 10) | type EndpointOptions struct
type EndpointOption (line 31) | type EndpointOption
function WithOptions (line 34) | func WithOptions(options EndpointOptions) EndpointOption {
function WithIgnoreBusinessError (line 42) | func WithIgnoreBusinessError(ignoreBusinessError bool) EndpointOption {
function WithOperationNameFunc (line 50) | func WithOperationNameFunc(getOperationName func(ctx context.Context, na...
function WithTags (line 57) | func WithTags(tags opentracing.Tags) EndpointOption {
function WithTagsFunc (line 70) | func WithTagsFunc(getTags func(ctx context.Context) opentracing.Tags) En...
FILE: tracing/opentracing/endpoint_test.go
constant span1 (line 23) | span1 = "SPAN-1"
constant span2 (line 24) | span2 = "SPAN-2"
constant span3 (line 25) | span3 = "SPAN-3"
constant span4 (line 26) | span4 = "SPAN-4"
constant span5 (line 27) | span5 = "SPAN-5"
constant span6 (line 28) | span6 = "SPAN-6"
constant span7 (line 29) | span7 = "SPAN-7"
constant span8 (line 30) | span8 = "SPAN-8"
type failedResponse (line 42) | type failedResponse struct
method Failed (line 46) | func (r failedResponse) Failed() error {
function TestTraceEndpoint (line 50) | func TestTraceEndpoint(t *testing.T) {
function TestTraceEndpointNoContextSpan (line 83) | func TestTraceEndpointNoContextSpan(t *testing.T) {
function TestTraceEndpointWithOptions (line 105) | func TestTraceEndpointWithOptions(t *testing.T) {
function TestTraceServer (line 351) | func TestTraceServer(t *testing.T) {
function TestTraceClient (line 379) | func TestTraceClient(t *testing.T) {
FILE: tracing/opentracing/grpc.go
function ContextToGRPC (line 18) | func ContextToGRPC(tracer opentracing.Tracer, logger log.Logger) func(ct...
function GRPCToContext (line 35) | func GRPCToContext(tracer opentracing.Tracer, operationName string, logg...
type metadataReaderWriter (line 49) | type metadataReaderWriter struct
method Set (line 53) | func (w metadataReaderWriter) Set(key, val string) {
method ForeachKey (line 61) | func (w metadataReaderWriter) ForeachKey(handler func(key, val string)...
FILE: tracing/opentracing/grpc_test.go
function TestTraceGRPCRequestRoundtrip (line 15) | func TestTraceGRPCRequestRoundtrip(t *testing.T) {
FILE: tracing/opentracing/http.go
function ContextToHTTP (line 19) | func ContextToHTTP(tracer opentracing.Tracer, logger log.Logger) kithttp...
function HTTPToContext (line 54) | func HTTPToContext(tracer opentracing.Tracer, operationName string, logg...
FILE: tracing/opentracing/http_test.go
function TestTraceHTTPRequestRoundtrip (line 17) | func TestTraceHTTPRequestRoundtrip(t *testing.T) {
function TestContextToHTTPTags (line 68) | func TestContextToHTTPTags(t *testing.T) {
function TestHTTPToContextTags (line 87) | func TestHTTPToContextTags(t *testing.T) {
FILE: tracing/zipkin/endpoint.go
function TraceEndpoint (line 16) | func TraceEndpoint(tracer *zipkin.Tracer, name string) endpoint.Middlewa...
FILE: tracing/zipkin/endpoint_test.go
constant spanName (line 14) | spanName = "test"
function TestTraceEndpoint (line 16) | func TestTraceEndpoint(t *testing.T) {
FILE: tracing/zipkin/grpc.go
function GRPCClientTrace (line 29) | func GRPCClientTrace(tracer *zipkin.Tracer, options ...TracerOption) kit...
function GRPCServerTrace (line 123) | func GRPCServerTrace(tracer *zipkin.Tracer, options ...TracerOption) kit...
FILE: tracing/zipkin/grpc_test.go
type dummy (line 18) | type dummy struct
function unaryInterceptor (line 20) | func unaryInterceptor(
function TestGRPCClientTrace (line 27) | func TestGRPCClientTrace(t *testing.T) {
function TestGRPCServerTrace (line 75) | func TestGRPCServerTrace(t *testing.T) {
FILE: tracing/zipkin/http.go
function HTTPClientTrace (line 28) | func HTTPClientTrace(tracer *zipkin.Tracer, options ...TracerOption) kit...
function HTTPServerTrace (line 132) | func HTTPServerTrace(tracer *zipkin.Tracer, options ...TracerOption) kit...
FILE: tracing/zipkin/http_test.go
constant testName (line 24) | testName = "test"
constant testBody (line 25) | testBody = "test_body"
constant testTagKey (line 26) | testTagKey = "test_key"
constant testTagValue (line 27) | testTagValue = "test_value"
function TestHTTPClientTracePropagatesParentSpan (line 30) | func TestHTTPClientTracePropagatesParentSpan(t *testing.T) {
function TestHTTPClientTraceAddsExpectedTags (line 75) | func TestHTTPClientTraceAddsExpectedTags(t *testing.T) {
function testHTTPClientTraceCase (line 89) | func testHTTPClientTraceCase(t *testing.T, responseStatusCode int, errTa...
function TestHTTPServerTrace (line 165) | func TestHTTPServerTrace(t *testing.T) {
function TestHTTPServerTraceIsRequestBasedSampled (line 224) | func TestHTTPServerTraceIsRequestBasedSampled(t *testing.T) {
FILE: tracing/zipkin/options.go
type TracerOption (line 10) | type TracerOption
function Name (line 15) | func Name(name string) TracerOption {
function Tags (line 22) | func Tags(tags map[string]string) TracerOption {
function Logger (line 32) | func Logger(logger log.Logger) TracerOption {
function AllowPropagation (line 47) | func AllowPropagation(propagate bool) TracerOption {
function RequestSampler (line 55) | func RequestSampler(sampleFunc func(r *http.Request) bool) TracerOption {
type tracerOptions (line 61) | type tracerOptions struct
FILE: transport/amqp/encode_decode.go
type DecodeRequestFunc (line 11) | type DecodeRequestFunc
type EncodeRequestFunc (line 15) | type EncodeRequestFunc
type EncodeResponseFunc (line 19) | type EncodeResponseFunc
type DecodeResponseFunc (line 23) | type DecodeResponseFunc
FILE: transport/amqp/publisher.go
constant maxCorrelationIdLength (line 13) | maxCorrelationIdLength = 255
type Publisher (line 17) | type Publisher struct
method Endpoint (line 77) | func (p Publisher) Endpoint() endpoint.Endpoint {
function NewPublisher (line 29) | func NewPublisher(
type PublisherOption (line 51) | type PublisherOption
function PublisherBefore (line 55) | func PublisherBefore(before ...RequestFunc) PublisherOption {
function PublisherAfter (line 62) | func PublisherAfter(after ...PublisherResponseFunc) PublisherOption {
function PublisherDeliverer (line 67) | func PublisherDeliverer(deliverer Deliverer) PublisherOption {
function PublisherTimeout (line 72) | func PublisherTimeout(timeout time.Duration) PublisherOption {
type Deliverer (line 115) | type Deliverer
function DefaultDeliverer (line 124) | func DefaultDeliverer(
function SendAndForgetDeliverer (line 175) | func SendAndForgetDeliverer(
FILE: transport/amqp/publisher_test.go
function TestBadEncode (line 20) | func TestBadEncode(t *testing.T) {
function TestBadDecode (line 52) | func TestBadDecode(t *testing.T) {
function TestPublisherTimeout (line 102) | func TestPublisherTimeout(t *testing.T) {
function TestSuccessfulPublisher (line 144) | func TestSuccessfulPublisher(t *testing.T) {
function TestSendAndForgetPublisher (line 229) | func TestSendAndForgetPublisher(t *testing.T) {
FILE: transport/amqp/request_response_func.go
type RequestFunc (line 13) | type RequestFunc
type SubscriberResponseFunc (line 18) | type SubscriberResponseFunc
type PublisherResponseFunc (line 27) | type PublisherResponseFunc
function SetPublishExchange (line 31) | func SetPublishExchange(publishExchange string) RequestFunc {
function SetPublishKey (line 39) | func SetPublishKey(publishKey string) RequestFunc {
function SetPublishDeliveryMode (line 47) | func SetPublishDeliveryMode(dmode uint8) RequestFunc {
function SetNackSleepDuration (line 59) | func SetNackSleepDuration(duration time.Duration) RequestFunc {
function SetConsumeAutoAck (line 70) | func SetConsumeAutoAck(autoAck bool) RequestFunc {
function SetConsumeArgs (line 79) | func SetConsumeArgs(args amqp.Table) RequestFunc {
function SetContentType (line 87) | func SetContentType(contentType string) RequestFunc {
function SetContentEncoding (line 96) | func SetContentEncoding(contentEncoding string) RequestFunc {
function SetCorrelationID (line 105) | func SetCorrelationID(cid string) RequestFunc {
function SetAckAfterEndpoint (line 116) | func SetAckAfterEndpoint(multiple bool) SubscriberResponseFunc {
function getPublishExchange (line 127) | func getPublishExchange(ctx context.Context) string {
function getPublishKey (line 134) | func getPublishKey(ctx context.Context) string {
function getNackSleepDuration (line 141) | func getNackSleepDuration(ctx context.Context) time.Duration {
function getConsumeAutoAck (line 148) | func getConsumeAutoAck(ctx context.Context) bool {
function getConsumeArgs (line 155) | func getConsumeArgs(ctx context.Context) amqp.Table {
type contextKey (line 162) | type contextKey
constant ContextKeyExchange (line 167) | ContextKeyExchange contextKey = iota
constant ContextKeyPublishKey (line 170) | ContextKeyPublishKey
constant ContextKeyNackSleepDuration (line 175) | ContextKeyNackSleepDuration
constant ContextKeyAutoAck (line 178) | ContextKeyAutoAck
constant ContextKeyConsumeArgs (line 181) | ContextKeyConsumeArgs
FILE: transport/amqp/subscriber.go
type Subscriber (line 15) | type Subscriber struct
method ServeDelivery (line 98) | func (s Subscriber) ServeDelivery(ch Channel) func(deliv *amqp.Deliver...
function NewSubscriber (line 28) | func NewSubscriber(
type SubscriberOption (line 49) | type SubscriberOption
function SubscriberBefore (line 53) | func SubscriberBefore(before ...RequestFunc) SubscriberOption {
function SubscriberAfter (line 59) | func SubscriberAfter(after ...SubscriberResponseFunc) SubscriberOption {
function SubscriberResponsePublisher (line 66) | func SubscriberResponsePublisher(rp ResponsePublisher) SubscriberOption {
function SubscriberErrorEncoder (line 74) | func SubscriberErrorEncoder(ee ErrorEncoder) SubscriberOption {
function SubscriberErrorLogger (line 83) | func SubscriberErrorLogger(logger log.Logger) SubscriberOption {
function SubscriberErrorHandler (line 91) | func SubscriberErrorHandler(errorHandler transport.ErrorHandler) Subscri...
function EncodeJSONResponse (line 144) | func EncodeJSONResponse(
function EncodeNopResponse (line 158) | func EncodeNopResponse(
type ResponsePublisher (line 171) | type ResponsePublisher
function DefaultResponsePublisher (line 180) | func DefaultResponsePublisher(
function NopResponsePublisher (line 208) | func NopResponsePublisher(
type ErrorEncoder (line 221) | type ErrorEncoder
function DefaultErrorEncoder (line 226) | func DefaultErrorEncoder(ctx context.Context,
function SingleNackRequeueErrorEncoder (line 232) | func SingleNackRequeueErrorEncoder(ctx context.Context,
function ReplyErrorEncoder (line 244) | func ReplyErrorEncoder(
function ReplyAndAckErrorEncoder (line 282) | func ReplyAndAckErrorEncoder(ctx context.Context, err error, deliv *amqp...
type DefaultErrorResponse (line 289) | type DefaultErrorResponse struct
type Channel (line 295) | type Channel interface
FILE: transport/amqp/subscriber_test.go
type mockChannel (line 19) | type mockChannel struct
method Publish (line 26) | func (ch *mockChannel) Publish(exchange, key string, mandatory, immedi...
method Consume (line 35) | func (ch *mockChannel) Consume(queue, consumer string, autoAck, exclus...
function TestSubscriberBadDecode (line 44) | func TestSubscriberBadDecode(t *testing.T) {
function TestSubscriberBadEndpoint (line 76) | func TestSubscriberBadEndpoint(t *testing.T) {
function TestSubscriberBadEncoder (line 110) | func TestSubscriberBadEncoder(t *testing.T) {
function TestSubscriberSuccess (line 145) | func TestSubscriberSuccess(t *testing.T) {
function TestNopResponseSubscriber (line 221) | func TestNopResponseSubscriber(t *testing.T) {
function TestSubscriberMultipleBefore (line 260) | func TestSubscriberMultipleBefore(t *testing.T) {
function TestDefaultContentMetaData (line 327) | func TestDefaultContentMetaData(t *testing.T) {
function decodeSubscriberError (line 369) | func decodeSubscriberError(pub amqp.Publishing) (amqptransport.DefaultEr...
type testReq (line 375) | type testReq struct
type testRes (line 378) | type testRes struct
function testEndpoint (line 383) | func testEndpoint(_ context.Context, request interface{}) (interface{}, ...
function testReqDecoder (line 399) | func testReqDecoder(_ context.Context, d *amqp.Delivery) (interface{}, e...
function testReqEncoder (line 405) | func testReqEncoder(_ context.Context, p *amqp.Publishing, request inter...
function testResDeliveryDecoder (line 418) | func testResDeliveryDecoder(_ context.Context, d *amqp.Delivery) (interf...
function testResDecoder (line 422) | func testResDecoder(b []byte) (interface{}, error) {
FILE: transport/amqp/util.go
function randomString (line 7) | func randomString(l int) string {
function randInt (line 15) | func randInt(min int, max int) int {
FILE: transport/awslambda/encode_decode.go
type DecodeRequestFunc (line 9) | type DecodeRequestFunc
type EncodeResponseFunc (line 13) | type EncodeResponseFunc
type ErrorEncoder (line 16) | type ErrorEncoder
FILE: transport/awslambda/handler.go
type Handler (line 12) | type Handler struct
method Invoke (line 90) | func (h *Handler) Invoke(
function NewHandler (line 25) | func NewHandler(
type HandlerOption (line 45) | type HandlerOption
function HandlerBefore (line 49) | func HandlerBefore(before ...HandlerRequestFunc) HandlerOption {
function HandlerAfter (line 55) | func HandlerAfter(after ...HandlerResponseFunc) HandlerOption {
function HandlerErrorLogger (line 62) | func HandlerErrorLogger(logger log.Logger) HandlerOption {
function HandlerErrorHandler (line 68) | func HandlerErrorHandler(errorHandler transport.ErrorHandler) HandlerOpt...
function HandlerErrorEncoder (line 73) | func HandlerErrorEncoder(ee ErrorEncoder) HandlerOption {
function HandlerFinalizer (line 79) | func HandlerFinalizer(f ...HandlerFinalizerFunc) HandlerOption {
function DefaultErrorEncoder (line 85) | func DefaultErrorEncoder(ctx context.Context, err error) ([]byte, error) {
FILE: transport/awslambda/handler_test.go
type key (line 14) | type key
constant KeyBeforeOne (line 17) | KeyBeforeOne key = iota
constant KeyBeforeTwo (line 18) | KeyBeforeTwo key = iota
constant KeyAfterOne (line 19) | KeyAfterOne key = iota
constant KeyEncMode (line 20) | KeyEncMode key = iota
type apiGatewayProxyRequest (line 24) | type apiGatewayProxyRequest struct
type apiGatewayProxyResponse (line 29) | type apiGatewayProxyResponse struct
function TestDefaultErrorEncoder (line 34) | func TestDefaultErrorEncoder(t *testing.T) {
function TestInvokeHappyPath (line 46) | func TestInvokeHappyPath(t *testing.T) {
function TestInvokeFailDecode (line 138) | func TestInvokeFailDecode(t *testing.T) {
function TestInvokeFailEndpoint (line 174) | func TestInvokeFailEndpoint(t *testing.T) {
function TestInvokeFailEncode (line 224) | func TestInvokeFailEncode(t *testing.T) {
function decodeHelloRequestWithTwoBefores (line 282) | func decodeHelloRequestWithTwoBefores(
function encodeResponse (line 313) | func encodeResponse(
type helloRequest (line 335) | type helloRequest struct
type helloResponse (line 339) | type helloResponse struct
function makeTest01HelloEndpoint (line 343) | func makeTest01HelloEndpoint(svc serviceTest01) endpoint.Endpoint {
function makeTest01FailEndpoint (line 351) | func makeTest01FailEndpoint(_ serviceTest01) endpoint.Endpoint {
type serviceTest01 (line 357) | type serviceTest01 struct
method hello (line 359) | func (ts *serviceTest01) hello(name string) string {
FILE: transport/awslambda/request_response_funcs.go
type HandlerRequestFunc (line 11) | type HandlerRequestFunc
type HandlerResponseFunc (line 17) | type HandlerResponseFunc
type HandlerFinalizerFunc (line 21) | type HandlerFinalizerFunc
FILE: transport/error_handler.go
type ErrorHandler (line 11) | type ErrorHandler interface
type LogErrorHandler (line 16) | type LogErrorHandler struct
method Handle (line 26) | func (h *LogErrorHandler) Handle(ctx context.Context, err error) {
function NewLogErrorHandler (line 20) | func NewLogErrorHandler(logger log.Logger) *LogErrorHandler {
type ErrorHandlerFunc (line 34) | type ErrorHandlerFunc
method Handle (line 37) | func (f ErrorHandlerFunc) Handle(ctx context.Context, err error) {
FILE: transport/error_handler_test.go
function TestLogErrorHandler (line 12) | func TestLogErrorHandler(t *testing.T) {
FILE: transport/grpc/_grpc_test/client.go
type clientBinding (line 13) | type clientBinding struct
method Test (line 17) | func (c *clientBinding) Test(ctx context.Context, a string, b int64) (...
function NewClient (line 26) | func NewClient(cc *grpc.ClientConn) Service {
FILE: transport/grpc/_grpc_test/context_metadata.go
type metaContext (line 10) | type metaContext
constant correlationID (line 13) | correlationID metaContext = "correlation-id"
constant responseHDR (line 14) | responseHDR metaContext = "my-response-header"
constant responseTRLR (line 15) | responseTRLR metaContext = "my-response-trailer"
constant correlationIDTRLR (line 16) | correlationIDTRLR metaContext = "correlation-id-consumed"
function injectCorrelationID (line 21) | func injectCorrelationID(ctx context.Context, md *metadata.MD) context.C...
function displayClientRequestHeaders (line 29) | func displayClientRequestHeaders(ctx context.Context, md *metadata.MD) c...
function extractCorrelationID (line 41) | func extractCorrelationID(ctx context.Context, md metadata.MD) context.C...
function displayServerRequestHeaders (line 50) | func displayServerRequestHeaders(ctx context.Context, md metadata.MD) co...
function injectResponseHeader (line 62) | func injectResponseHeader(ctx context.Context, md *metadata.MD, _ *metad...
function displayServerResponseHeaders (line 67) | func displayServerResponseHeaders(ctx context.Context, md *metadata.MD, ...
function injectResponseTrailer (line 77) | func injectResponseTrailer(ctx context.Context, _ *metadata.MD, md *meta...
function injectConsumedCorrelationID (line 82) | func injectConsumedCorrelationID(ctx context.Context, _ *metadata.MD, md...
function displayServerResponseTrailers (line 90) | func displayServerResponseTrailers(ctx context.Context, _ *metadata.MD, ...
function displayClientResponseHeaders (line 102) | func displayClientResponseHeaders(ctx context.Context, md metadata.MD, _...
function displayClientResponseTrailers (line 112) | func displayClientResponseTrailers(ctx context.Context, _ metadata.MD, m...
function extractConsumedCorrelationID (line 122) | func extractConsumedCorrelationID(ctx context.Context, _ metadata.MD, md...
function SetCorrelationID (line 132) | func SetCorrelationID(ctx context.Context, v string) context.Context {
function GetConsumedCorrelationID (line 136) | func GetConsumedCorrelationID(ctx context.Context) string {
FILE: transport/grpc/_grpc_test/pb/test.pb.go
constant _ (line 18) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
constant _ (line 20) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
type TestRequest (line 23) | type TestRequest struct
method Reset (line 32) | func (x *TestRequest) Reset() {
method String (line 41) | func (x *TestRequest) String() string {
method ProtoMessage (line 45) | func (*TestRequest) ProtoMessage() {}
method ProtoReflect (line 47) | func (x *TestRequest) ProtoReflect() protoreflect.Message {
method Descriptor (line 60) | func (*TestRequest) Descriptor() ([]byte, []int) {
method GetA (line 64) | func (x *TestRequest) GetA() string {
method GetB (line 71) | func (x *TestRequest) GetB() int64 {
type TestResponse (line 78) | type TestResponse struct
method Reset (line 86) | func (x *TestResponse) Reset() {
method String (line 95) | func (x *TestResponse) String() string {
method ProtoMessage (line 99) | func (*TestResponse) ProtoMessage() {}
method ProtoReflect (line 101) | func (x *TestResponse) ProtoReflect() protoreflect.Message {
method Descriptor (line 114) | func (*TestResponse) Descriptor() ([]byte, []int) {
method GetV (line 118) | func (x *TestResponse) GetV() string {
function file_test_proto_rawDescGZIP (line 145) | func file_test_proto_rawDescGZIP() []byte {
function init (line 167) | func init() { file_test_proto_init() }
function file_test_proto_init (line 168) | func file_test_proto_init() {
FILE: transport/grpc/_grpc_test/pb/test_grpc.pb.go
constant _ (line 15) | _ = grpc.SupportPackageIsVersion7
type TestClient (line 20) | type TestClient interface
type testClient (line 24) | type testClient struct
method Test (line 32) | func (c *testClient) Test(ctx context.Context, in *TestRequest, opts ....
function NewTestClient (line 28) | func NewTestClient(cc grpc.ClientConnInterface) TestClient {
type TestServer (line 44) | type TestServer interface
type UnimplementedTestServer (line 50) | type UnimplementedTestServer struct
method Test (line 53) | func (UnimplementedTestServer) Test(context.Context, *TestRequest) (*T...
method mustEmbedUnimplementedTestServer (line 56) | func (UnimplementedTestServer) mustEmbedUnimplementedTestServer() {}
type UnsafeTestServer (line 61) | type UnsafeTestServer interface
function RegisterTestServer (line 65) | func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer) {
function _Test_Test_Handler (line 69) | func _Test_Test_Handler(srv interface{}, ctx context.Context, dec func(i...
FILE: transport/grpc/_grpc_test/request_response.go
function encodeRequest (line 9) | func encodeRequest(ctx context.Context, req interface{}) (interface{}, e...
function decodeRequest (line 14) | func decodeRequest(ctx context.Context, req interface{}) (interface{}, e...
function encodeResponse (line 19) | func encodeResponse(ctx context.Context, resp interface{}) (interface{},...
function decodeResponse (line 24) | func decodeResponse(ctx context.Context, resp interface{}) (interface{},...
FILE: transport/grpc/_grpc_test/server.go
type service (line 12) | type service struct
method Test (line 14) | func (service) Test(ctx context.Context, a string, b int64) (context.C...
function NewService (line 18) | func NewService() Service {
function makeTestEndpoint (line 22) | func makeTestEndpoint(svc Service) endpoint.Endpoint {
type serverBinding (line 33) | type serverBinding struct
method Test (line 39) | func (b *serverBinding) Test(ctx context.Context, req *pb.TestRequest)...
function NewBinding (line 47) | func NewBinding(svc Service) *serverBinding {
FILE: transport/grpc/_grpc_test/service.go
type Service (line 5) | type Service interface
type TestRequest (line 9) | type TestRequest struct
type TestResponse (line 14) | type TestResponse struct
FILE: transport/grpc/client.go
type Client (line 16) | type Client struct
method Endpoint (line 87) | func (c Client) Endpoint() endpoint.Endpoint {
function NewClient (line 31) | func NewClient(
type ClientOption (line 64) | type ClientOption
function ClientBefore (line 68) | func ClientBefore(before ...ClientRequestFunc) ClientOption {
function ClientAfter (line 75) | func ClientAfter(after ...ClientResponseFunc) ClientOption {
function ClientFinalizer (line 81) | func ClientFinalizer(f ...ClientFinalizerFunc) ClientOption {
type ClientFinalizerFunc (line 140) | type ClientFinalizerFunc
FILE: transport/grpc/client_test.go
constant hostPort (line 16) | hostPort string = "localhost:8002"
function TestGRPCClient (line 19) | func TestGRPCClient(t *testing.T) {
FILE: transport/grpc/encode_decode.go
type DecodeRequestFunc (line 11) | type DecodeRequestFunc
type EncodeRequestFunc (line 17) | type EncodeRequestFunc
type EncodeResponseFunc (line 23) | type EncodeResponseFunc
type DecodeResponseFunc (line 29) | type DecodeResponseFunc
FILE: transport/grpc/request_response_funcs.go
constant binHdrSuffix (line 12) | binHdrSuffix = "-bin"
type ClientRequestFunc (line 19) | type ClientRequestFunc
type ServerRequestFunc (line 24) | type ServerRequestFunc
type ServerResponseFunc (line 30) | type ServerResponseFunc
type ClientResponseFunc (line 36) | type ClientResponseFunc
function SetRequestHeader (line 40) | func SetRequestHeader(key, val string) ClientRequestFunc {
function SetResponseHeader (line 50) | func SetResponseHeader(key, val string) ServerResponseFunc {
function SetResponseTrailer (line 60) | func SetResponseTrailer(key, val string) ServerResponseFunc {
function EncodeKeyValue (line 69) | func EncodeKeyValue(key, val string) (string, string) {
type contextKey (line 77) | type contextKey
constant ContextKeyRequestMethod (line 80) | ContextKeyRequestMethod contextKey = iota
FILE: transport/grpc/server.go
type Handler (line 17) | type Handler interface
type Server (line 22) | type Server struct
method ServeGRPC (line 90) | func (s Server) ServeGRPC(ctx context.Context, req interface{}) (retct...
function NewServer (line 37) | func NewServer(
type ServerOption (line 56) | type ServerOption
function ServerBefore (line 60) | func ServerBefore(before ...ServerRequestFunc) ServerOption {
function ServerAfter (line 66) | func ServerAfter(after ...ServerResponseFunc) ServerOption {
function ServerErrorLogger (line 73) | func ServerErrorLogger(logger log.Logger) ServerOption {
function ServerErrorHandler (line 79) | func ServerErrorHandler(errorHandler transport.ErrorHandler) ServerOption {
function ServerFinalizer (line 85) | func ServerFinalizer(f ...ServerFinalizerFunc) ServerOption {
type ServerFinalizerFunc (line 157) | type ServerFinalizerFunc
function Interceptor (line 163) | func Interceptor(
FILE: transport/http/client.go
type HTTPClient (line 17) | type HTTPClient interface
type Client (line 22) | type Client struct
method Endpoint (line 90) | func (c Client) Endpoint() endpoint.Endpoint {
function NewClient (line 33) | func NewClient(method string, tgt *url.URL, enc EncodeRequestFunc, dec D...
function NewExplicitClient (line 40) | func NewExplicitClient(req CreateRequestFunc, dec DecodeResponseFunc, op...
type ClientOption (line 53) | type ClientOption
function SetClient (line 57) | func SetClient(client HTTPClient) ClientOption {
function ClientBefore (line 63) | func ClientBefore(before ...RequestFunc) ClientOption {
function ClientAfter (line 71) | func ClientAfter(after ...ClientResponseFunc) ClientOption {
function ClientFinalizer (line 78) | func ClientFinalizer(f ...ClientFinalizerFunc) ClientOption {
function BufferedStream (line 85) | func BufferedStream(buffered bool) ClientOption {
type bodyWithCancel (line 151) | type bodyWithCancel struct
method Close (line 157) | func (bwc bodyWithCancel) Close() error {
type ClientFinalizerFunc (line 169) | type ClientFinalizerFunc
function EncodeJSONRequest (line 175) | func EncodeJSONRequest(c context.Context, r *http.Request, request inter...
function EncodeXMLRequest (line 190) | func EncodeXMLRequest(c context.Context, r *http.Request, request interf...
function makeCreateRequestFunc (line 206) | func makeCreateRequestFunc(method string, target *url.URL, enc EncodeReq...
FILE: transport/http/client_test.go
type TestResponse (line 19) | type TestResponse struct
function TestHTTPClient (line 24) | func TestHTTPClient(t *testing.T) {
function TestHTTPClientBufferedStream (line 102) | func TestHTTPClientBufferedStream(t *testing.T) {
function TestClientFinalizer (line 153) | func TestClientFinalizer(t *testing.T) {
function TestEncodeJSONRequest (line 203) | func TestEncodeJSONRequest(t *testing.T) {
function TestSetClient (line 265) | func TestSetClient(t *testing.T) {
function TestNewExplicitClient (line 302) | func TestNewExplicitClient(t *testing.T) {
function mustParse (line 332) | func mustParse(s string) *url.URL {
type enhancedRequest (line 340) | type enhancedRequest struct
method Headers (line 344) | func (e enhancedRequest) Headers() http.Header { return http.Header{"X...
type httpClientFunc (line 346) | type httpClientFunc
method Do (line 348) | func (f httpClientFunc) Do(req *http.Request) (*http.Response, error) {
FILE: transport/http/encode_decode.go
type DecodeRequestFunc (line 12) | type DecodeRequestFunc
type EncodeRequestFunc (line 18) | type EncodeRequestFunc
type CreateRequestFunc (line 24) | type CreateRequestFunc
type EncodeResponseFunc (line 30) | type EncodeResponseFunc
type DecodeResponseFunc (line 36) | type DecodeResponseFunc
FILE: transport/http/example_test.go
function ExamplePopulateRequestContext (line 10) | func ExamplePopulateRequestContext() {
FILE: transport/http/intercepting_writer.go
type interceptingWriter (line 8) | type interceptingWriter struct
method WriteHeader (line 16) | func (w *interceptingWriter) WriteHeader(code int) {
method Write (line 21) | func (w *interceptingWriter) Write(p []byte) (int, error) {
method reimplementInterfaces (line 34) | func (w *interceptingWriter) reimplementInterfaces() http.ResponseWrit...
FILE: transport/http/intercepting_writer_test.go
type versatileWriter (line 11) | type versatileWriter struct
method Flush (line 20) | func (v *versatileWriter) Flush() { v.flushCalled = true }
method Push (line 21) | func (v *versatileWriter) Push(target string, opts *http.PushOptions) ...
method ReadFrom (line 25) | func (v *versatileWriter) ReadFrom(r io.Reader) (n int64, err error) {
method CloseNotify (line 29) | func (v *versatileWriter) CloseNotify() <-chan bool { v.closeNotifyCal...
method Hijack (line 30) | func (v *versatileWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
function TestInterceptingWriter_passthroughs (line 35) | func TestInterceptingWriter_passthroughs(t *testing.T) {
function TestInterceptingWriter_reimplementInterfaces (line 63) | func TestInterceptingWriter_reimplementInterfaces(t *testing.T) {
FILE: transport/http/jsonrpc/client.go
type Client (line 17) | type Client struct
method Endpoint (line 143) | func (c Client) Endpoint() endpoint.Endpoint {
type clientRequest (line 35) | type clientRequest struct
function NewClient (line 43) | func NewClient(
function DefaultRequestEncoder (line 66) | func DefaultRequestEncoder(_ context.Context, req interface{}) (json.Raw...
function DefaultResponseDecoder (line 72) | func DefaultResponseDecoder(_ context.Context, res Response) (interface{...
type ClientOption (line 85) | type ClientOption
function SetClient (line 89) | func SetClient(client httptransport.HTTPClient) ClientOption {
function ClientBefore (line 95) | func ClientBefore(before ...httptransport.RequestFunc) ClientOption {
function ClientAfter (line 102) | func ClientAfter(after ...httptransport.ClientResponseFunc) ClientOption {
function ClientFinalizer (line 108) | func ClientFinalizer(f httptransport.ClientFinalizerFunc) ClientOption {
function ClientRequestEncoder (line 114) | func ClientRequestEncoder(enc EncodeRequestFunc) ClientOption {
function ClientResponseDecoder (line 120) | func ClientResponseDecoder(dec DecodeResponseFunc) ClientOption {
type RequestIDGenerator (line 125) | type RequestIDGenerator interface
function ClientRequestIDGenerator (line 132) | func ClientRequestIDGenerator(g RequestIDGenerator) ClientOption {
function BufferedStream (line 138) | func BufferedStream(buffered bool) ClientOption {
type ClientFinalizerFunc (line 227) | type ClientFinalizerFunc
type autoIncrementID (line 231) | type autoIncrementID struct
method Generate (line 244) | func (i *autoIncrementID) Generate() interface{} {
function NewAutoIncrementID (line 237) | func NewAutoIncrementID(init uint64) RequestIDGenerator {
FILE: transport/http/jsonrpc/client_test.go
type TestResponse (line 16) | type TestResponse struct
type testServerResponseOptions (line 21) | type testServerResponseOptions struct
function httptestServer (line 26) | func httptestServer(t *testing.T) *httptest.Server {
function TestBeforeAfterFuncs (line 49) | func TestBeforeAfterFuncs(t *testing.T) {
type staticIDGenerator (line 124) | type staticIDGenerator
method Generate (line 126) | func (g staticIDGenerator) Generate() interface{} { return g }
function TestClientHappyPath (line 128) | func TestClientHappyPath(t *testing.T) {
function TestCanUseDefaults (line 242) | func TestCanUseDefaults(t *testing.T) {
function TestClientCanHandleJSONRPCError (line 302) | func TestClientCanHandleJSONRPCError(t *testing.T) {
function TestDefaultAutoIncrementer (line 350) | func TestDefaultAutoIncrementer(t *testing.T) {
function mustParse (line 363) | func mustParse(s string) *url.URL {
FILE: transport/http/jsonrpc/encode_decode.go
type EndpointCodec (line 14) | type EndpointCodec struct
type EndpointCodecMap (line 21) | type EndpointCodecMap
type DecodeRequestFunc (line 27) | type DecodeRequestFunc
type EncodeResponseFunc (line 33) | type EncodeResponseFunc
type EncodeRequestFunc (line 41) | type EncodeRequestFunc
type DecodeResponseFunc (line 48) | type DecodeResponseFunc
FILE: transport/http/jsonrpc/error.go
type Error (line 6) | type Error struct
method Error (line 13) | func (e Error) Error() string {
method ErrorCode (line 21) | func (e Error) ErrorCode() int {
constant ParseError (line 28) | ParseError int = -32700
constant InvalidRequestError (line 31) | InvalidRequestError int = -32600
constant MethodNotFoundError (line 34) | MethodNotFoundError int = -32601
constant InvalidParamsError (line 37) | InvalidParamsError int = -32602
constant InternalError (line 40) | InternalError int = -32603
function ErrorMessage (line 53) | func ErrorMessage(code int) string {
type parseError (line 57) | type parseError
method Error (line 59) | func (e parseError) Error() string {
method ErrorCode (line 62) | func (e parseError) ErrorCode() int {
type invalidRequestError (line 66) | type invalidRequestError
method Error (line 68) | func (e invalidRequestError) Error() string {
method ErrorCode (line 71) | func (e invalidRequestError) ErrorCode() int {
type methodNotFoundError (line 75) | type methodNotFoundError
method Error (line 77) | func (e methodNotFoundError) Error() string {
method ErrorCode (line 80) | func (e methodNotFoundError) ErrorCode() int {
type invalidParamsError (line 84) | type invalidParamsError
method Error (line 86) | func (e invalidParamsError) Error() string {
method ErrorCode (line 89) | func (e invalidParamsError) ErrorCode() int {
type internalError (line 93) | type internalError
method Error (line 95) | func (e internalError) Error() string {
method ErrorCode (line 98) | func (e internalError) ErrorCode() int {
FILE: transport/http/jsonrpc/error_test.go
function TestError (line 5) | func TestError(t *testing.T) {
function TestErrorsSatisfyError (line 28) | func TestErrorsSatisfyError(t *testing.T) {
FILE: transport/http/jsonrpc/request_response_types.go
type Request (line 11) | type Request struct
type RequestID (line 24) | type RequestID struct
method UnmarshalJSON (line 39) | func (id *RequestID) UnmarshalJSON(b []byte) error {
method MarshalJSON (line 47) | func (id *RequestID) MarshalJSON() ([]byte, error) {
method Int (line 59) | func (id *RequestID) Int() (int, error) {
method Float32 (line 65) | func (id *RequestID) Float32() (float32, error) {
method String (line 71) | func (id *RequestID) String() (string, error) {
type RequestFunc (line 36) | type RequestFunc
type Response (line 77) | type Response struct
constant Version (line 86) | Version string = "2.0"
constant ContentType (line 89) | ContentType string = "application/json; charset=utf-8"
type contextKey (line 92) | type contextKey
constant ContextKeyRequestMethod (line 95) | ContextKeyRequestMethod contextKey = iota
FILE: transport/http/jsonrpc/request_response_types_test.go
function TestCanUnMarshalID (line 11) | func TestCanUnMarshalID(t *testing.T) {
function TestCanUnmarshalNullID (line 100) | func TestCanUnmarshalNullID(t *testing.T) {
function TestCanMarshalID (line 113) | func TestCanMarshalID(t *testing.T) {
FILE: transport/http/jsonrpc/server.go
type requestIDKeyType (line 14) | type requestIDKeyType struct
type Server (line 19) | type Server struct
method ServeHTTP (line 92) | func (s Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
function NewServer (line 30) | func NewServer(
type ServerOption (line 46) | type ServerOption
function ServerBefore (line 50) | func ServerBefore(before ...httptransport.RequestFunc) ServerOption {
function ServerBeforeCodec (line 58) | func ServerBeforeCodec(beforeCodec ...RequestFunc) ServerOption {
function ServerAfter (line 64) | func ServerAfter(after ...httptransport.ServerResponseFunc) ServerOption {
function ServerErrorEncoder (line 72) | func ServerErrorEncoder(ee httptransport.ErrorEncoder) ServerOption {
function ServerErrorLogger (line 81) | func ServerErrorLogger(logger log.Logger) ServerOption {
function ServerFinalizer (line 87) | func ServerFinalizer(f httptransport.ServerFinalizerFunc) ServerOption {
function DefaultErrorEncoder (line 183) | func DefaultErrorEncoder(ctx context.Context, err error, w http.Response...
type ErrorCoder (line 217) | type ErrorCoder interface
type interceptingWriter (line 223) | type interceptingWriter struct
method WriteHeader (line 230) | func (w *interceptingWriter) WriteHeader(code int) {
FILE: transport/http/jsonrpc/server_test.go
function addBody (line 19) | func addBody() io.Reader {
function body (line 23) | func body(in string) io.Reader {
function unmarshalResponse (line 27) | func unmarshalResponse(body []byte) (resp jsonrpc.Response, err error) {
function expectErrorCode (line 32) | func expectErrorCode(t *testing.T, want int, body []byte) {
function expectValidRequestID (line 47) | func expectValidRequestID(t *testing.T, want int, body []byte) {
function expectNilRequestID (line 63) | func expectNilRequestID(t *testing.T, body []byte) {
function nopDecoder (line 75) | func nopDecoder(context.Context, json.RawMessage) (interface{}, error) {...
function nopEncoder (line 76) | func nopEncoder(context.Context, interface{}) (json.RawMessage, error) {...
type mockLogger (line 78) | type mockLogger struct
method Log (line 83) | func (l *mockLogger) Log(keyvals ...interface{}) error {
function TestServerBadDecode (line 89) | func TestServerBadDecode(t *testing.T) {
function TestServerBadEndpoint (line 112) | func TestServerBadEndpoint(t *testing.T) {
function TestServerBadEncode (line 132) | func TestServerBadEncode(t *testing.T) {
function TestServerErrorEncoder (line 152) | func TestServerErrorEncoder(t *testing.T) {
function TestCanRejectNonPostRequest (line 179) | func TestCanRejectNonPostRequest(t *testing.T) {
function TestCanRejectInvalidJSON (line 190) | func TestCanRejectInvalidJSON(t *testing.T) {
function TestServerUnregisteredMethod (line 204) | func TestServerUnregisteredMethod(t *testing.T) {
function TestServerHappyPath (line 217) | func TestServerHappyPath(t *testing.T) {
function TestMultipleServerBeforeCodec (line 238) | func TestMultipleServerBeforeCodec(t *testing.T) {
function TestMultipleServerBefore (line 274) | func TestMultipleServerBefore(t *testing.T) {
function TestMultipleServerAfter (line 310) | func TestMultipleServerAfter(t *testing.T) {
function TestCanFinalize (line 346) | func TestCanFinalize(t *testing.T) {
function testServer (line 378) | func testServer(t *testing.T) (step func(), resp <-chan *http.Response) {
FILE: transport/http/proto/client.go
function EncodeProtoRequest (line 18) | func EncodeProtoRequest(_ context.Context, r *http.Request, preq interfa...
FILE: transport/http/proto/proto_pb_test.go
constant _ (line 18) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
constant _ (line 20) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
type Cat (line 23) | type Cat struct
method Reset (line 33) | func (x *Cat) Reset() {
method String (line 42) | func (x *Cat) String() string {
method ProtoMessage (line 46) | func (*Cat) ProtoMessage() {}
method ProtoReflect (line 48) | func (x *Cat) ProtoReflect() protoreflect.Message {
method Descriptor (line 61) | func (*Cat) Descriptor() ([]byte, []int) {
method GetAge (line 65) | func (x *Cat) GetAge() int32 {
method GetBreed (line 72) | func (x *Cat) GetBreed() string {
method GetName (line 79) | func (x *Cat) GetName() string {
function file_proto_test_proto_rawDescGZIP (line 102) | func file_proto_test_proto_rawDescGZIP() []byte {
function init (line 121) | func init() { file_proto_test_proto_init() }
function file_proto_test_proto_init (line 122) | func file_proto_test_proto_init() {
FILE: transport/http/proto/proto_test.go
function TestEncodeProtoRequest (line 13) | func TestEncodeProtoRequest(t *testing.T) {
function TestEncodeProtoResponse (line 50) | func TestEncodeProtoResponse(t *testing.T) {
method StatusCode (line 94) | func (c *Cat) StatusCode() int {
FILE: transport/http/proto/server.go
function EncodeProtoResponse (line 16) | func EncodeProtoResponse(ctx context.Context, w http.ResponseWriter, pre...
FILE: transport/http/request_response_funcs.go
type RequestFunc (line 12) | type RequestFunc
type ServerResponseFunc (line 17) | type ServerResponseFunc
type ClientResponseFunc (line 22) | type ClientResponseFunc
function SetContentType (line 26) | func SetContentType(contentType string) ServerResponseFunc {
function SetResponseHeader (line 31) | func SetResponseHeader(key, val string) ServerResponseFunc {
function SetRequestHeader (line 39) | func SetRequestHeader(key, val string) RequestFunc {
function PopulateRequestContext (line 49) | func PopulateRequestContext(ctx context.Context, r *http.Request) contex...
type contextKey (line 70) | type contextKey
constant ContextKeyRequestMethod (line 75) | ContextKeyRequestMethod contextKey = iota
constant ContextKeyRequestURI (line 79) | ContextKeyRequestURI
constant ContextKeyRequestPath (line 83) | ContextKeyRequestPath
constant ContextKeyRequestProto (line 87) | ContextKeyRequestProto
constant ContextKeyRequestHost (line 91) | ContextKeyRequestHost
constant ContextKeyRequestRemoteAddr (line 95) | ContextKeyRequestRemoteAddr
constant ContextKeyRequestXForwardedFor (line 99) | ContextKeyRequestXForwardedFor
constant ContextKeyRequestXForwardedProto (line 103) | ContextKeyRequestXForwardedProto
constant ContextKeyRequestAuthorization (line 107) | ContextKeyRequestAuthorization
constant ContextKeyRequestReferer (line 111) | ContextKeyRequestReferer
constant ContextKeyRequestUserAgent (line 115) | ContextKeyRequestUserAgent
constant ContextKeyRequestXRequestID (line 119) | ContextKeyRequestXRequestID
constant ContextKeyRequestAccept (line 123) | ContextKeyRequestAccept
constant ContextKeyResponseHeaders (line 128) | ContextKeyResponseHeaders
constant ContextKeyResponseSize (line 132) | ContextKeyResponseSize
FILE: transport/http/request_response_funcs_test.go
function TestSetHeader (line 11) | func TestSetHeader(t *testing.T) {
function TestSetContentType (line 23) | func TestSetContentType(t *testing.T) {
FILE: transport/http/server.go
type Server (line 14) | type Server struct
method ServeHTTP (line 95) | func (s Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
function NewServer (line 27) | func NewServer(
type ServerOption (line 47) | type ServerOption
function ServerBefore (line 51) | func ServerBefore(before ...RequestFunc) ServerOption {
function ServerAfter (line 57) | func ServerAfter(after ...ServerResponseFunc) ServerOption {
function ServerErrorEncoder (line 65) | func ServerErrorEncoder(ee ErrorEncoder) ServerOption {
function ServerErrorLogger (line 75) | func ServerErrorLogger(logger log.Logger) ServerOption {
function ServerErrorHandler (line 84) | func ServerErrorHandler(errorHandler transport.ErrorHandler) ServerOption {
function ServerFinalizer (line 90) | func ServerFinalizer(f ...ServerFinalizerFunc) ServerOption {
type ErrorEncoder (line 143) | type ErrorEncoder
type ServerFinalizerFunc (line 150) | type ServerFinalizerFunc
function NopRequestDecoder (line 154) | func NopRequestDecoder(ctx context.Context, r *http.Request) (interface{...
function EncodeJSONResponse (line 163) | func EncodeJSONResponse(_ context.Context, w http.ResponseWriter, respon...
function DefaultErrorEncoder (line 190) | func DefaultErrorEncoder(_ context.Context, err error, w http.ResponseWr...
type StatusCoder (line 216) | type StatusCoder interface
type Headerer (line 223) | type Headerer interface
FILE: transport/http/server_test.go
function TestServerBadDecode (line 17) | func TestServerBadDecode(t *testing.T) {
function TestServerBadEndpoint (line 31) | func TestServerBadEndpoint(t *testing.T) {
function TestServerBadEncode (line 45) | func TestServerBadEncode(t *testing.T) {
function TestServerErrorEncoder (line 59) | func TestServerErrorEncoder(t *testing.T) {
function TestServerHappyPath (line 81) | func TestServerHappyPath(t *testing.T) {
function TestMultipleServerBefore (line 92) | func TestMultipleServerBefore(t *testing.T) {
function TestMultipleServerAfter (line 137) | func TestMultipleServerAfter(t *testing.T) {
function TestServerFinalizer (line 182) | func TestServerFinalizer(t *testing.T) {
type enhancedResponse (line 231) | type enhancedResponse struct
method StatusCode (line 235) | func (e enhancedResponse) StatusCode() int { return http.StatusPa...
method Headers (line 236) | func (e enhancedResponse) Headers() http.Header { return http.Header{"...
function TestEncodeJSONResponse (line 238) | func TestEncodeJSONResponse(t *testing.T) {
type multiHeaderResponse (line 264) | type multiHeaderResponse struct
method Headers (line 266) | func (_ multiHeaderResponse) Headers() http.Header {
function TestAddMultipleHeaders (line 270) | func TestAddMultipleHeaders(t *testing.T) {
type multiHeaderResponseError (line 295) | type multiHeaderResponseError struct
method Error (line 300) | func (m multiHeaderResponseError) Error() string {
function TestAddMultipleHeadersErrorEncoder (line 304) | func TestAddMultipleHeadersErrorEncoder(t *testing.T) {
type noContentResponse (line 335) | type noContentResponse struct
method StatusCode (line 337) | func (e noContentResponse) StatusCode() int { return http.StatusNoCont...
function TestEncodeNoContent (line 339) | func TestEncodeNoContent(t *testing.T) {
type enhancedError (line 362) | type enhancedError struct
method Error (line 364) | func (e enhancedError) Error() string { return "enhance...
method StatusCode (line 365) | func (e enhancedError) StatusCode() int { return http.Sta...
method MarshalJSON (line 366) | func (e enhancedError) MarshalJSON() ([]byte, error) { return []byte(`...
method Headers (line 367) | func (e enhancedError) Headers() http.Header { return http.Hea...
function TestEnhancedError (line 369) | func TestEnhancedError(t *testing.T) {
function TestNoOpRequestDecoder (line 396) | func TestNoOpRequestDecoder(t *testing.T) {
function testServer (line 418) | func testServer(t *testing.T) (step func(), resp <-chan *http.Response) {
FILE: transport/httprp/server.go
type RequestFunc (line 13) | type RequestFunc
type Server (line 16) | type Server struct
method ServeHTTP (line 49) | func (s Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
function NewServer (line 26) | func NewServer(
type ServerOption (line 40) | type ServerOption
function ServerBefore (line 44) | func ServerBefore(before ...RequestFunc) ServerOption {
FILE: transport/httprp/server_test.go
function TestServerHappyPathSingleServer (line 14) | func TestServerHappyPathSingleServer(t *testing.T) {
function TestServerHappyPathSingleServerWithServerOptions (line 39) | func TestServerHappyPathSingleServerWithServerOptions(t *testing.T) {
function TestServerOriginServerNotFoundResponse (line 77) | func TestServerOriginServerNotFoundResponse(t *testing.T) {
function TestServerOriginServerUnreachable (line 94) | func TestServerOriginServerUnreachable(t *testing.T) {
function TestMultipleServerBefore (line 119) | func TestMultipleServerBefore(t *testing.T) {
FILE: transport/nats/encode_decode.go
type DecodeRequestFunc (line 13) | type DecodeRequestFunc
type EncodeRequestFunc (line 19) | type EncodeRequestFunc
type EncodeResponseFunc (line 25) | type EncodeResponseFunc
type DecodeResponseFunc (line 31) | type DecodeResponseFunc
FILE: transport/nats/publisher.go
type Publisher (line 12) | type Publisher struct
method Endpoint (line 65) | func (p Publisher) Endpoint() endpoint.Endpoint {
function NewPublisher (line 23) | func NewPublisher(
type PublisherOption (line 44) | type PublisherOption
function PublisherBefore (line 48) | func PublisherBefore(before ...RequestFunc) PublisherOption {
function PublisherAfter (line 55) | func PublisherAfter(after ...PublisherResponseFunc) PublisherOption {
function PublisherTimeout (line 60) | func PublisherTimeout(timeout time.Duration) PublisherOption {
function EncodeJSONRequest (line 101) | func EncodeJSONRequest(_ context.Context, msg *nats.Msg, request interfa...
FILE: transport/nats/publisher_test.go
function TestPublisher (line 13) | func TestPublisher(t *testing.T) {
function TestPublisherBefore (line 58) | func TestPublisherBefore(t *testing.T) {
function TestPublisherAfter (line 107) | func TestPublisherAfter(t *testing.T) {
function TestPublisherTimeout (line 156) | func TestPublisherTimeout(t *testing.T) {
function TestPublisherCancellation (line 193) | func TestPublisherCancellation(t *testing.T) {
function TestEncodeJSONRequest (line 232) | func TestEncodeJSONRequest(t *testing.T) {
FILE: transport/nats/request_response_funcs.go
type RequestFunc (line 12) | type RequestFunc
type SubscriberResponseFunc (line 17) | type SubscriberResponseFunc
type PublisherResponseFunc (line 22) | type PublisherResponseFunc
FILE: transport/nats/subscriber.go
type Subscriber (line 15) | type Subscriber struct
method ServeMsg (line 94) | func (s Subscriber) ServeMsg(nc *nats.Conn) func(msg *nats.Msg) {
function NewSubscriber (line 28) | func NewSubscriber(
type SubscriberOption (line 48) | type SubscriberOption
function SubscriberBefore (line 52) | func SubscriberBefore(before ...RequestFunc) SubscriberOption {
function SubscriberAfter (line 58) | func SubscriberAfter(after ...SubscriberResponseFunc) SubscriberOption {
function SubscriberErrorEncoder (line 66) | func SubscriberErrorEncoder(ee ErrorEncoder) SubscriberOption {
function SubscriberErrorLogger (line 75) | func SubscriberErrorLogger(logger log.Logger) SubscriberOption {
function SubscriberErrorHandler (line 83) | func SubscriberErrorHandler(errorHandler transport.ErrorHandler) Subscri...
function SubscriberFinalizer (line 89) | func SubscriberFinalizer(f ...SubscriberFinalizerFunc) SubscriberOption {
type ErrorEncoder (line 151) | type ErrorEncoder
type SubscriberFinalizerFunc (line 156) | type SubscriberFinalizerFunc
function NopRequestDecoder (line 160) | func NopRequestDecoder(_ context.Context, _ *nats.Msg) (interface{}, err...
function EncodeJSONResponse (line 167) | func EncodeJSONResponse(_ context.Context, reply string, nc *nats.Conn, ...
function DefaultErrorEncoder (line 177) | func DefaultErrorEncoder(_ context.Context, err error, reply string, nc ...
FILE: transport/nats/subscriber_test.go
type TestResponse (line 19) | type TestResponse struct
function newNATSConn (line 24) | func newNATSConn(t *testing.T) (*server.Server, *nats.Conn) {
function TestSubscriberBadDecode (line 57) | func TestSubscriberBadDecode(t *testing.T) {
function TestSubscriberBadEndpoint (line 76) | func TestSubscriberBadEndpoint(t *testing.T) {
function TestSubscriberBadEncode (line 94) | func TestSubscriberBadEncode(t *testing.T) {
function TestSubscriberErrorEncoder (line 112) | func TestSubscriberErrorEncoder(t *testing.T) {
function TestSubscriberHappySubject (line 150) | func TestSubscriberHappySubject(t *testing.T) {
function TestMultipleSubscriberBefore (line 166) | func TestMultipleSubscriberBefore(t *testing.T) {
function TestMultipleSubscriberAfter (line 228) | func TestMultipleSubscriberAfter(t *testing.T) {
function TestSubscriberFinalizerFunc (line 286) | func TestSubscriberFinalizerFunc(t *testing.T) {
function TestEncodeJSONResponse (line 338) | func TestEncodeJSONResponse(t *testing.T) {
type responseError (line 369) | type responseError struct
method Error (line 373) | func (m responseError) Error() string {
function TestErrorEncoder (line 377) | func TestErrorEncoder(t *testing.T) {
type noContentResponse (line 413) | type noContentResponse struct
function TestEncodeNoContent (line 415) | func TestEncodeNoContent(t *testing.T) {
function TestNoOpRequestDecoder (line 442) | func TestNoOpRequestDecoder(t *testing.T) {
function testSubscriber (line 474) | func testSubscriber(t *testing.T) (step func(), resp <-chan *nats.Msg) {
function testRequest (line 513) | func testRequest(t *testing.T, c *nats.Conn, handler *natstransport.Subs...
FILE: util/conn/manager.go
type Dialer (line 14) | type Dialer
type AfterFunc (line 17) | type AfterFunc
type Manager (line 26) | type Manager struct
method Take (line 63) | func (m *Manager) Take() net.Conn {
method Put (line 70) | func (m *Manager) Put(err error) {
method Write (line 75) | func (m *Manager) Write(b []byte) (int, error) {
method loop (line 85) | func (m *Manager) loop() {
function NewManager (line 41) | func NewManager(d Dialer, network, address string, after AfterFunc, logg...
function NewDefaultManager (line 58) | func NewDefaultManager(network, address string, logger log.Logger) *Mana...
function dial (line 128) | func dial(d Dialer, network, address string, logger log.Logger) net.Conn {
function Exponential (line 140) | func Exponential(d time.Duration) time.Duration {
FILE: util/conn/manager_test.go
function TestManager (line 13) | func TestManager(t *testing.T) {
function TestIssue292 (line 94) | func TestIssue292(t *testing.T) {
type mockConn (line 127) | type mockConn struct
method Read (line 131) | func (c *mockConn) Read(b []byte) (n int, err error) {
method Write (line 136) | func (c *mockConn) Write(b []byte) (n int, err error) {
method Close (line 141) | func (c *mockConn) Close() error { return nil }
method LocalAddr (line 142) | func (c *mockConn) LocalAddr() net.Addr { return nil }
method RemoteAddr (line 143) | func (c *mockConn) RemoteAddr() net.Addr { return nil }
method SetDeadline (line 144) | func (c *mockConn) SetDeadline(t time.Time) error { return nil }
method SetReadDeadline (line 145) | func (c *mockConn) SetReadDeadline(t time.Time) error { return nil }
method SetWriteDeadline (line 146) | func (c *mockConn) SetWriteDeadline(t time.Time) error { return nil }
function within (line 148) | func within(d time.Duration, f func() bool) bool {
Condensed preview — 288 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (975K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 70,
"preview": "# These are supported funding model platforms\n\ngithub: [peterbourgon]\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yaml",
"chars": 352,
"preview": "name: Bug report\ndescription: Report a bug\nlabels: [bug]\nbody:\n- type: textarea\n attributes:\n label: What did you do"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 545,
"preview": "blank_issues_enabled: false\ncontact_links:\n - name: Ask a question\n url: https://github.com/go-kit/kit/discussions/n"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yaml",
"chars": 182,
"preview": "name: Feature request\ndescription: Suggest new functionality or an enhancement\nbody:\n- type: textarea\n attributes:\n "
},
{
"path": ".github/workflows/.editorconfig",
"chars": 24,
"preview": "[*.yml]\nindent_size = 2\n"
},
{
"path": ".github/workflows/ci.yml",
"chars": 1794,
"preview": "name: CI\n\non:\n push:\n branches:\n - master\n pull_request:\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-l"
},
{
"path": ".gitignore",
"chars": 468,
"preview": "*.coverprofile\n\n# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n\n# Folders\n_obj\n_test\n_ol"
},
{
"path": "CONTRIBUTING.md",
"chars": 839,
"preview": "# Contributing\n\nFirst, thank you for contributing! We love and encourage pull requests from everyone.\n\nBefore submitting"
},
{
"path": "LICENSE",
"chars": 1081,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Peter Bourgon\n\nPermission is hereby granted, free of charge, to any person obt"
},
{
"path": "README.md",
"chars": 7246,
"preview": "# Go kit\n\n\n[\n\ntype co"
},
{
"path": "auth/jwt/middleware_test.go",
"chars": 7735,
"preview": "package jwt\n\nimport (\n\t\"context\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"crypto/subtle\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"githu"
},
{
"path": "auth/jwt/transport.go",
"chars": 2231,
"preview": "package jwt\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\tstdhttp \"net/http\"\n\t\"strings\"\n\n\t\"google.golang.org/grpc/metadata\"\n\n\t\"github.com"
},
{
"path": "auth/jwt/transport_test.go",
"chars": 3255,
"preview": "package jwt\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"testing\"\n\n\t\"google.golang.org/grpc/metadata\"\n)\n\nfunc TestHTTPToCon"
},
{
"path": "circuitbreaker/doc.go",
"chars": 466,
"preview": "// Package circuitbreaker implements the circuit breaker pattern.\n//\n// Circuit breakers prevent thundering herds, and i"
},
{
"path": "circuitbreaker/gobreaker.go",
"chars": 701,
"preview": "package circuitbreaker\n\nimport (\n\t\"context\"\n\n\t\"github.com/sony/gobreaker\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n)\n\n// Gobre"
},
{
"path": "circuitbreaker/gobreaker_test.go",
"chars": 539,
"preview": "package circuitbreaker_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/sony/gobreaker\"\n\n\t\"github.com/go-kit/kit/circuitbreaker\"\n"
},
{
"path": "circuitbreaker/handy_breaker.go",
"chars": 944,
"preview": "package circuitbreaker\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\t\"github.com/streadway/handy/breaker\"\n\n\t\"github.com/go-kit/kit/endp"
},
{
"path": "circuitbreaker/handy_breaker_test.go",
"chars": 606,
"preview": "package circuitbreaker_test\n\nimport (\n\t\"testing\"\n\n\thandybreaker \"github.com/streadway/handy/breaker\"\n\n\t\"github.com/go-ki"
},
{
"path": "circuitbreaker/hystrix.go",
"chars": 830,
"preview": "package circuitbreaker\n\nimport (\n\t\"context\"\n\n\t\"github.com/afex/hystrix-go/hystrix\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n)\n"
},
{
"path": "circuitbreaker/hystrix_test.go",
"chars": 1143,
"preview": "package circuitbreaker_test\n\nimport (\n\t\"io/ioutil\"\n\tstdlog \"log\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/afex/hystrix-go/hystri"
},
{
"path": "circuitbreaker/util_test.go",
"chars": 1787,
"preview": "package circuitbreaker_test\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"testing\"\n\t\"time\"\n\n\t\"gith"
},
{
"path": "codecov.yml",
"chars": 15,
"preview": "comment: false\n"
},
{
"path": "docker-compose-integration.yml",
"chars": 503,
"preview": "version: '2'\nservices:\n etcd:\n image: gcr.io/etcd-development/etcd:v3.5.0\n ports:\n - \"2379:2379\"\n environ"
},
{
"path": "endpoint/doc.go",
"chars": 211,
"preview": "// Package endpoint defines an abstraction for RPCs.\n//\n// Endpoints are a fundamental building block for many Go kit co"
},
{
"path": "endpoint/endpoint.go",
"chars": 1454,
"preview": "package endpoint\n\nimport (\n\t\"context\"\n)\n\n// Endpoint is the fundamental building block of servers and clients.\n// It rep"
},
{
"path": "endpoint/endpoint_example_test.go",
"chars": 847,
"preview": "package endpoint_test\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n)\n\nfunc ExampleChain() {\n\te := endp"
},
{
"path": "examples/README.md",
"chars": 102,
"preview": "# Examples\n\nExamples have been relocated to a separate repository: https://github.com/go-kit/examples\n"
},
{
"path": "go.mod",
"chars": 4171,
"preview": "module github.com/go-kit/kit\n\ngo 1.17\n\nrequire (\n\tgithub.com/VividCortex/gohistogram v1.0.0\n\tgithub.com/afex/hystrix-go "
},
{
"path": "go.sum",
"chars": 83947,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1"
},
{
"path": "lint",
"chars": 588,
"preview": "#!/usr/bin/env bash\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\nif [ ! $(command -v gometalinter) ]\nthen\n\tgo get git"
},
{
"path": "log/README.md",
"chars": 5269,
"preview": "# package log\n\n**Deprecation notice:** The core Go kit log packages (log, log/level, log/term, and\nlog/syslog) have been"
},
{
"path": "log/deprecated_levels/levels.go",
"chars": 4091,
"preview": "// Package levels implements leveled logging on top of Go kit's log package.\n//\n// Deprecated: Use github.com/go-kit/log"
},
{
"path": "log/deprecated_levels/levels_test.go",
"chars": 1713,
"preview": "package levels_test\n\nimport (\n\t\"bytes\"\n\t\"os\"\n\t\"testing\"\n\n\tlevels \"github.com/go-kit/kit/log/deprecated_levels\"\n\t\"github."
},
{
"path": "log/doc.go",
"chars": 5403,
"preview": "// Package log provides a structured logger.\n//\n// Deprecated: Use github.com/go-kit/log instead.\n//\n// Structured loggi"
},
{
"path": "log/example_test.go",
"chars": 2783,
"preview": "package log_test\n\nimport (\n\t\"math/rand\"\n\t\"os\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/log\"\n)\n\nfunc Example_basic() {\n\tl"
},
{
"path": "log/json_logger.go",
"chars": 413,
"preview": "package log\n\nimport (\n\t\"io\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// NewJSONLogger returns a Logger that encodes keyvals to the W"
},
{
"path": "log/level/doc.go",
"chars": 998,
"preview": "// Package level implements leveled logging on top of Go kit's log package.\n//\n// Deprecated: Use github.com/go-kit/log/"
},
{
"path": "log/level/example_test.go",
"chars": 1248,
"preview": "package level_test\n\nimport (\n\t\"errors\"\n\t\"os\"\n\n\t\"github.com/go-kit/kit/log\"\n\t\"github.com/go-kit/kit/log/level\"\n)\n\nfunc Ex"
},
{
"path": "log/level/level.go",
"chars": 3998,
"preview": "package level\n\nimport (\n\t\"github.com/go-kit/log\"\n\t\"github.com/go-kit/log/level\"\n)\n\n// Error returns a logger that includ"
},
{
"path": "log/log.go",
"chars": 2274,
"preview": "package log\n\nimport (\n\t\"github.com/go-kit/log\"\n)\n\n// Logger is the fundamental interface for all log operations. Log cre"
},
{
"path": "log/logfmt_logger.go",
"chars": 412,
"preview": "package log\n\nimport (\n\t\"io\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// NewLogfmtLogger returns a logger that encodes keyvals to the"
},
{
"path": "log/logrus/logrus_logger.go",
"chars": 1427,
"preview": "// Package logrus provides an adapter to the\n// go-kit log.Logger interface.\npackage logrus\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n"
},
{
"path": "log/logrus/logrus_logger_test.go",
"chars": 3012,
"preview": "package logrus_test\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\tlog \"github.com/go-kit/kit/log"
},
{
"path": "log/nop_logger.go",
"chars": 162,
"preview": "package log\n\nimport \"github.com/go-kit/log\"\n\n// NewNopLogger returns a logger that doesn't do anything.\nfunc NewNopLogge"
},
{
"path": "log/stdlib.go",
"chars": 2028,
"preview": "package log\n\nimport (\n\t\"io\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// StdlibWriter implements io.Writer by invoking the stdlib log"
},
{
"path": "log/sync.go",
"chars": 1215,
"preview": "package log\n\nimport (\n\t\"io\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// SwapLogger wraps another logger that may be safely replaced "
},
{
"path": "log/syslog/example_test.go",
"chars": 639,
"preview": "// +build !windows\n// +build !plan9\n// +build !nacl\n\npackage syslog_test\n\nimport (\n\t\"fmt\"\n\n\tgosyslog \"log/syslog\"\n\n\t\"git"
},
{
"path": "log/syslog/syslog.go",
"chars": 1077,
"preview": "//go:build !windows && !plan9 && !nacl\n// +build !windows,!plan9,!nacl\n\n// Deprecated: Use github.com/go-kit/log/syslog "
},
{
"path": "log/term/colorlogger.go",
"chars": 1145,
"preview": "package term\n\nimport (\n\t\"io\"\n\n\t\"github.com/go-kit/log\"\n\t\"github.com/go-kit/log/term\"\n)\n\n// Color represents an ANSI colo"
},
{
"path": "log/term/colorwriter.go",
"chars": 311,
"preview": "package term\n\nimport (\n\t\"io\"\n\n\t\"github.com/go-kit/log/term\"\n)\n\n// NewColorWriter returns an io.Writer that writes to w a"
},
{
"path": "log/term/example_test.go",
"chars": 1395,
"preview": "package term_test\n\nimport (\n\t\"errors\"\n\t\"os\"\n\n\t\"github.com/go-kit/kit/log\"\n\t\"github.com/go-kit/kit/log/term\"\n)\n\nfunc Exam"
},
{
"path": "log/term/term.go",
"chars": 726,
"preview": "// Package term provides tools for logging to a terminal.\n//\n// Deprecated: Use github.com/go-kit/log/term instead.\npack"
},
{
"path": "log/value.go",
"chars": 1786,
"preview": "package log\n\nimport (\n\t\"time\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// A Valuer generates a log value. When passed to With, WithP"
},
{
"path": "log/zap/zap_sugar_logger.go",
"chars": 963,
"preview": "package zap\n\nimport (\n\t\"github.com/go-kit/log\"\n\t\"go.uber.org/zap\"\n\t\"go.uber.org/zap/zapcore\"\n)\n\ntype zapSugarLogger func"
},
{
"path": "log/zap/zap_sugar_logger_test.go",
"chars": 2456,
"preview": "package zap_test\n\nimport (\n\t\"encoding/json\"\n\tkitzap \"github.com/go-kit/kit/log/zap\"\n\t\"go.uber.org/zap\"\n\t\"go.uber.org/zap"
},
{
"path": "metrics/README.md",
"chars": 2572,
"preview": "# package metrics\n\n`package metrics` provides a set of uniform interfaces for service instrumentation.\nIt has\n [counters"
},
{
"path": "metrics/cloudwatch/cloudwatch.go",
"chars": 9588,
"preview": "package cloudwatch\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"gith"
},
{
"path": "metrics/cloudwatch/cloudwatch_test.go",
"chars": 7957,
"preview": "package cloudwatch\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"sync\"\n\t\"testing\"\n\n\t\"github.com/aws/aws-sdk-go/service/cloudwa"
},
{
"path": "metrics/cloudwatch2/cloudwatch2.go",
"chars": 6944,
"preview": "// Package cloudwatch2 emits all data as a StatisticsSet (rather than\n// a singular Value) to CloudWatch via the aws-sdk"
},
{
"path": "metrics/cloudwatch2/cloudwatch2_test.go",
"chars": 2869,
"preview": "package cloudwatch2\n\nimport (\n\t\"context\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/aws/aws-sdk-go-v2/service/cloudwatch\"\n\t\"git"
},
{
"path": "metrics/discard/discard.go",
"chars": 1064,
"preview": "// Package discard provides a no-op metrics backend.\npackage discard\n\nimport \"github.com/go-kit/kit/metrics\"\n\ntype count"
},
{
"path": "metrics/doc.go",
"chars": 4676,
"preview": "// Package metrics provides a framework for application instrumentation. It's\n// primarily designed to help you get star"
},
{
"path": "metrics/dogstatsd/dogstatsd.go",
"chars": 11192,
"preview": "// Package dogstatsd provides a DogStatsD backend for package metrics. It's very\n// similar to StatsD, but supports arbi"
},
{
"path": "metrics/dogstatsd/dogstatsd_test.go",
"chars": 3087,
"preview": "package dogstatsd\n\nimport (\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/metrics/teststat\"\n\t\"github.com/go-kit/log\"\n)\n\nfunc TestC"
},
{
"path": "metrics/expvar/expvar.go",
"chars": 2592,
"preview": "// Package expvar provides expvar backends for metrics.\n// Label values are not supported.\npackage expvar\n\nimport (\n\t\"ex"
},
{
"path": "metrics/expvar/expvar_test.go",
"chars": 1242,
"preview": "package expvar\n\nimport (\n\t\"strconv\"\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/metrics/teststat\"\n)\n\nfunc TestCounter(t *testing"
},
{
"path": "metrics/generic/generic.go",
"chars": 5968,
"preview": "// Package generic implements generic versions of each of the metric types. They\n// can be embedded by other implementat"
},
{
"path": "metrics/generic/generic_test.go",
"chars": 4783,
"preview": "package generic_test\n\n// This is package generic_test in order to get around an import cycle: this\n// package imports te"
},
{
"path": "metrics/graphite/graphite.go",
"chars": 6292,
"preview": "// Package graphite provides a Graphite backend for metrics. Metrics are batched\n// and emitted in the plaintext protoco"
},
{
"path": "metrics/graphite/graphite_test.go",
"chars": 2086,
"preview": "package graphite\n\nimport (\n\t\"bytes\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/metrics/teststat\"\n\t\"github."
},
{
"path": "metrics/influx/example_test.go",
"chars": 3094,
"preview": "package influx\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\n\tinfluxdb \"github.com/influxdata/influxdb1-client/v2\"\n\n\t\"github.com/go-kit/lo"
},
{
"path": "metrics/influx/influx.go",
"chars": 7522,
"preview": "// Package influx provides an InfluxDB implementation for metrics. The model is\n// similar to other push-based instrumen"
},
{
"path": "metrics/influx/influx_test.go",
"chars": 3660,
"preview": "package influx\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"testing\"\n\n\tinfluxdb \"github.com/influxdata/in"
},
{
"path": "metrics/influxstatsd/influxstatsd.go",
"chars": 10936,
"preview": "// Package influxstatsd provides support for InfluxData's StatsD Telegraf plugin. It's very\n// similar to StatsD, but su"
},
{
"path": "metrics/influxstatsd/influxstatsd_test.go",
"chars": 3093,
"preview": "package influxstatsd\n\nimport (\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/metrics/teststat\"\n\t\"github.com/go-kit/log\"\n)\n\nfunc Te"
},
{
"path": "metrics/internal/convert/convert.go",
"chars": 3304,
"preview": "// Package convert provides a way to use Counters, Histograms, or Gauges\n// as one of the other types\npackage convert\n\ni"
},
{
"path": "metrics/internal/convert/convert_test.go",
"chars": 1653,
"preview": "package convert\n\nimport (\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/metrics/generic\"\n\t\"github.com/go-kit/kit/metrics/teststat\""
},
{
"path": "metrics/internal/lv/labelvalues.go",
"chars": 477,
"preview": "package lv\n\n// LabelValues is a type alias that provides validation on its With method.\n// Metrics may include it as a m"
},
{
"path": "metrics/internal/lv/labelvalues_test.go",
"chars": 617,
"preview": "package lv\n\nimport (\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestWith(t *testing.T) {\n\tvar a LabelValues\n\tb := a.With(\"a\", \"1\")\n\tc"
},
{
"path": "metrics/internal/lv/space.go",
"chars": 3679,
"preview": "package lv\n\nimport \"sync\"\n\n// NewSpace returns an N-dimensional vector space.\nfunc NewSpace() *Space {\n\treturn &Space{}\n"
},
{
"path": "metrics/internal/lv/space_test.go",
"chars": 2262,
"preview": "package lv\n\nimport (\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestSpaceWalkAbort(t *testing.T) {\n\ts := NewSpace()\n\ts.Observe(\"a\", L"
},
{
"path": "metrics/internal/ratemap/ratemap.go",
"chars": 1009,
"preview": "// Package ratemap implements a goroutine-safe map of string to float64. It can\n// be embedded in implementations whose "
},
{
"path": "metrics/metrics.go",
"chars": 817,
"preview": "package metrics\n\n// Counter describes a metric that accumulates values monotonically.\n// An example of a counter is the "
},
{
"path": "metrics/multi/multi.go",
"chars": 2168,
"preview": "// Package multi provides adapters that send observations to multiple metrics\n// simultaneously. This is useful if your "
},
{
"path": "metrics/multi/multi_test.go",
"chars": 2183,
"preview": "package multi\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/metrics\"\n)\n\nfunc TestMultiCounter(t *testing.T) {\n\tc1"
},
{
"path": "metrics/pcp/pcp.go",
"chars": 4075,
"preview": "package pcp\n\nimport (\n\t\"github.com/performancecopilot/speed/v4\"\n\n\t\"github.com/go-kit/kit/metrics\"\n)\n\n// Reporter encapsu"
},
{
"path": "metrics/pcp/pcp_test.go",
"chars": 1593,
"preview": "package pcp\n\nimport (\n\t\"testing\"\n\n\t\"github.com/performancecopilot/speed/v4\"\n\n\t\"github.com/go-kit/kit/metrics/teststat\"\n)"
},
{
"path": "metrics/prometheus/prometheus.go",
"chars": 4538,
"preview": "// Package prometheus provides Prometheus implementations for metrics.\n// Individual metrics are mapped to their Prometh"
},
{
"path": "metrics/prometheus/prometheus_test.go",
"chars": 6800,
"preview": "package prometheus\n\nimport (\n\t\"io/ioutil\"\n\t\"math\"\n\t\"math/rand\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"s"
},
{
"path": "metrics/provider/discard.go",
"chars": 745,
"preview": "package provider\n\nimport (\n\t\"github.com/go-kit/kit/metrics\"\n\t\"github.com/go-kit/kit/metrics/discard\"\n)\n\ntype discardProv"
},
{
"path": "metrics/provider/dogstatsd.go",
"chars": 1287,
"preview": "package provider\n\nimport (\n\t\"github.com/go-kit/kit/metrics\"\n\t\"github.com/go-kit/kit/metrics/dogstatsd\"\n)\n\ntype dogstatsd"
},
{
"path": "metrics/provider/expvar.go",
"chars": 776,
"preview": "package provider\n\nimport (\n\t\"github.com/go-kit/kit/metrics\"\n\t\"github.com/go-kit/kit/metrics/expvar\"\n)\n\ntype expvarProvid"
},
{
"path": "metrics/provider/graphite.go",
"chars": 1093,
"preview": "package provider\n\nimport (\n\t\"github.com/go-kit/kit/metrics\"\n\t\"github.com/go-kit/kit/metrics/graphite\"\n)\n\ntype graphitePr"
},
{
"path": "metrics/provider/influx.go",
"chars": 1063,
"preview": "package provider\n\nimport (\n\t\"github.com/go-kit/kit/metrics\"\n\t\"github.com/go-kit/kit/metrics/influx\"\n)\n\ntype influxProvid"
},
{
"path": "metrics/provider/prometheus.go",
"chars": 2095,
"preview": "package provider\n\nimport (\n\tstdprometheus \"github.com/prometheus/client_golang/prometheus\"\n\n\t\"github.com/go-kit/kit/metr"
},
{
"path": "metrics/provider/provider.go",
"chars": 1567,
"preview": "// Package provider provides a factory-like abstraction for metrics backends.\n// This package is provided specifically f"
},
{
"path": "metrics/provider/statsd.go",
"chars": 1196,
"preview": "package provider\n\nimport (\n\t\"github.com/go-kit/kit/metrics\"\n\t\"github.com/go-kit/kit/metrics/statsd\"\n)\n\ntype statsdProvid"
},
{
"path": "metrics/statsd/statsd.go",
"chars": 7060,
"preview": "// Package statsd provides a StatsD backend for package metrics. StatsD has no\n// concept of arbitrary key-value tagging"
},
{
"path": "metrics/statsd/statsd_test.go",
"chars": 2021,
"preview": "package statsd\n\nimport (\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/metrics/teststat\"\n\t\"github.com/go-kit/log\"\n)\n\nfunc TestCoun"
},
{
"path": "metrics/teststat/buffers.go",
"chars": 1875,
"preview": "package teststat\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"io\"\n\t\"regexp\"\n\t\"strconv\"\n\n\t\"github.com/go-kit/kit/metrics/generic\"\n)\n\n// "
},
{
"path": "metrics/teststat/populate.go",
"chars": 2159,
"preview": "package teststat\n\nimport (\n\t\"math\"\n\t\"math/rand\"\n\n\t\"github.com/go-kit/kit/metrics\"\n)\n\n// PopulateNormalHistogram makes a "
},
{
"path": "metrics/teststat/teststat.go",
"chars": 3669,
"preview": "// Package teststat provides helpers for testing metrics backends.\npackage teststat\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t"
},
{
"path": "metrics/timer.go",
"chars": 832,
"preview": "package metrics\n\nimport \"time\"\n\n// Timer acts as a stopwatch, sending observations to a wrapped histogram.\n// It's a bit"
},
{
"path": "metrics/timer_test.go",
"chars": 1395,
"preview": "package metrics_test\n\nimport (\n\t\"math\"\n\t\"testing\"\n\n\t\"time\"\n\n\t\"github.com/go-kit/kit/metrics\"\n\t\"github.com/go-kit/kit/met"
},
{
"path": "ratelimit/token_bucket.go",
"chars": 2203,
"preview": "package ratelimit\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n)\n\n// ErrLimited is returned in the "
},
{
"path": "ratelimit/token_bucket_test.go",
"chars": 1160,
"preview": "package ratelimit_test\n\nimport (\n\t\"context\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"golang.org/x/time/rate\"\n\n\t\"github.com/go-ki"
},
{
"path": "sd/benchmark_test.go",
"chars": 600,
"preview": "package sd\n\nimport (\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/log\"\n)\n\nfunc BenchmarkEndpo"
},
{
"path": "sd/consul/client.go",
"chars": 1171,
"preview": "package consul\n\nimport (\n\tconsul \"github.com/hashicorp/consul/api\"\n)\n\n// Client is a wrapper around the Consul API.\ntype"
},
{
"path": "sd/consul/client_test.go",
"chars": 3454,
"preview": "package consul\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"reflect\"\n\t\"testing\"\n\n\tstdconsul \"github.com/hashicorp/consul/api\"\n"
},
{
"path": "sd/consul/doc.go",
"chars": 94,
"preview": "// Package consul provides Instancer and Registrar implementations for Consul.\npackage consul\n"
},
{
"path": "sd/consul/instancer.go",
"chars": 4496,
"preview": "package consul\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"time\"\n\n\tconsul \"github.com/hashicorp/consul/api\"\n\n\t\"github.com/go-kit/kit/sd"
},
{
"path": "sd/consul/instancer_test.go",
"chars": 7462,
"preview": "package consul\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"testing\"\n\t\"time\"\n\n\tconsul \"github.com/hashicorp/consul/api\"\n\n\t\"github"
},
{
"path": "sd/consul/integration_test.go",
"chars": 2008,
"preview": "//go:build integration\n// +build integration\n\npackage consul\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/go-k"
},
{
"path": "sd/consul/registrar.go",
"chars": 1114,
"preview": "package consul\n\nimport (\n\t\"fmt\"\n\n\tstdconsul \"github.com/hashicorp/consul/api\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// Registrar "
},
{
"path": "sd/consul/registrar_test.go",
"chars": 608,
"preview": "package consul\n\nimport (\n\t\"testing\"\n\n\tstdconsul \"github.com/hashicorp/consul/api\"\n\n\t\"github.com/go-kit/log\"\n)\n\nfunc Test"
},
{
"path": "sd/dnssrv/doc.go",
"chars": 91,
"preview": "// Package dnssrv provides an Instancer implementation for DNS SRV records.\npackage dnssrv\n"
},
{
"path": "sd/dnssrv/instancer.go",
"chars": 2606,
"preview": "package dnssrv\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/sd\"\n\t\"github.com/go-kit/kit/sd/interna"
},
{
"path": "sd/dnssrv/instancer_test.go",
"chars": 2481,
"preview": "package dnssrv\n\nimport (\n\t\"net\"\n\t\"sync/atomic\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/sd\"\n\t\"github.com/go-kit/log\"\n"
},
{
"path": "sd/dnssrv/lookup.go",
"chars": 245,
"preview": "package dnssrv\n\nimport \"net\"\n\n// Lookup is a function that resolves a DNS SRV record to multiple addresses.\n// It has th"
},
{
"path": "sd/doc.go",
"chars": 395,
"preview": "// Package sd provides utilities related to service discovery. That includes the\n// client-side loadbalancer pattern, wh"
},
{
"path": "sd/endpoint_cache.go",
"chars": 3908,
"preview": "package sd\n\nimport (\n\t\"io\"\n\t\"sort\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/log\"\n)\n\n// end"
},
{
"path": "sd/endpoint_cache_test.go",
"chars": 4721,
"preview": "package sd\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/log\"\n)\n\nf"
},
{
"path": "sd/endpointer.go",
"chars": 2981,
"preview": "package sd\n\nimport (\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/log\"\n)\n\n// Endpointer listens to a s"
},
{
"path": "sd/endpointer_test.go",
"chars": 2145,
"preview": "package sd_test\n\nimport (\n\t\"io\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/kit/sd\"\n\t\"gith"
},
{
"path": "sd/etcd/client.go",
"chars": 4976,
"preview": "package etcd\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"errors\"\n\t\"io/ioutil\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\tetcd "
},
{
"path": "sd/etcd/client_test.go",
"chars": 8386,
"preview": "package etcd\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n\n\tetcd \"go.etcd.io/etcd/client/v2\"\n)\n\nfunc Tes"
},
{
"path": "sd/etcd/doc.go",
"chars": 241,
"preview": "// Package etcd provides an Instancer and Registrar implementation for etcd. If\n// you use etcd as your service discover"
},
{
"path": "sd/etcd/example_test.go",
"chars": 2166,
"preview": "package etcd\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/kit/sd\"\n\t\"github."
},
{
"path": "sd/etcd/instancer.go",
"chars": 1741,
"preview": "package etcd\n\nimport (\n\t\"github.com/go-kit/kit/sd\"\n\t\"github.com/go-kit/kit/sd/internal/instance\"\n\t\"github.com/go-kit/log"
},
{
"path": "sd/etcd/instancer_test.go",
"chars": 1329,
"preview": "package etcd\n\nimport (\n\t\"errors\"\n\t\"testing\"\n\n\tstdetcd \"go.etcd.io/etcd/client/v2\"\n\n\t\"github.com/go-kit/kit/sd\"\n\t\"github."
},
{
"path": "sd/etcd/integration_test.go",
"chars": 3351,
"preview": "//go:build flaky_integration\n// +build flaky_integration\n\npackage etcd\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"os\"\n\t\"testing\"\n\t\"tim"
},
{
"path": "sd/etcd/registrar.go",
"chars": 3118,
"preview": "package etcd\n\nimport (\n\t\"sync\"\n\t\"time\"\n\n\tetcd \"go.etcd.io/etcd/client/v2\"\n\n\t\"github.com/go-kit/log\"\n)\n\nconst minHeartBea"
},
{
"path": "sd/etcd/registrar_test.go",
"chars": 2953,
"preview": "package etcd\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"testing\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// testClient is a basic implementatio"
},
{
"path": "sd/etcdv3/client.go",
"chars": 6143,
"preview": "package etcdv3\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"errors\"\n\t\"time\"\n\n\t\"go.etcd.io/etcd/client/pkg/v3/transport\"\n\tclientv"
},
{
"path": "sd/etcdv3/client_test.go",
"chars": 1615,
"preview": "package etcdv3\n\nimport (\n\t\"context\"\n\t\"testing\"\n\t\"time\"\n\n\t\"google.golang.org/grpc\"\n)\n\nconst (\n\t// irrelevantEndpoint is a"
},
{
"path": "sd/etcdv3/doc.go",
"chars": 251,
"preview": "// Package etcdv3 provides an Instancer and Registrar implementation for etcd v3. If\n// you use etcd v3 as your service "
},
{
"path": "sd/etcdv3/example_test.go",
"chars": 2777,
"preview": "package etcdv3\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/kit/sd\"\n\t\"githu"
},
{
"path": "sd/etcdv3/instancer.go",
"chars": 1744,
"preview": "package etcdv3\n\nimport (\n\t\"github.com/go-kit/kit/sd\"\n\t\"github.com/go-kit/kit/sd/internal/instance\"\n\t\"github.com/go-kit/l"
},
{
"path": "sd/etcdv3/instancer_test.go",
"chars": 1421,
"preview": "package etcdv3\n\nimport (\n\t\"errors\"\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/sd\"\n\t\"github.com/go-kit/log\"\n)\n\nvar _ sd.Instance"
},
{
"path": "sd/etcdv3/integration_test.go",
"chars": 6026,
"preview": "//go:build flaky_integration\n// +build flaky_integration\n\npackage etcdv3\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"os\"\n\t\"testing\"\n\t\"t"
},
{
"path": "sd/etcdv3/registrar.go",
"chars": 2708,
"preview": "package etcdv3\n\nimport (\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/go-kit/log\"\n)\n\nconst minHeartBeatTime = 500 * time.Millisecond\n\n/"
},
{
"path": "sd/etcdv3/registrar_test.go",
"chars": 3044,
"preview": "package etcdv3\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"testing\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// testClient is a basic implementat"
},
{
"path": "sd/eureka/doc.go",
"chars": 107,
"preview": "// Package eureka provides Instancer and Registrar implementations for Netflix OSS's Eureka\npackage eureka\n"
},
{
"path": "sd/eureka/instancer.go",
"chars": 2454,
"preview": "package eureka\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/hudl/fargo\"\n\n\t\"github.com/go-kit/kit/sd\"\n\t\"github.com/go-kit/kit/sd/intern"
},
{
"path": "sd/eureka/instancer_test.go",
"chars": 2245,
"preview": "package eureka\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/hudl/fargo\"\n\n\t\"github.com/go-kit/kit/sd\"\n)\n\nvar _ sd.Instancer"
},
{
"path": "sd/eureka/integration_test.go",
"chars": 2726,
"preview": "//go:build integration\n// +build integration\n\npackage eureka\n\nimport (\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/hudl/fargo"
},
{
"path": "sd/eureka/registrar.go",
"chars": 3473,
"preview": "package eureka\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/hudl/fargo\"\n\n\t\"github.com/go-kit/kit/sd\"\n\t\"git"
},
{
"path": "sd/eureka/registrar_test.go",
"chars": 2579,
"preview": "package eureka\n\nimport (\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestRegistrar(t *testing.T) {\n\tconnection := &testConnection{\n\t\terrH"
},
{
"path": "sd/eureka/util_test.go",
"chars": 3840,
"preview": "package eureka\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/go-kit/log\"\n\t\"github.com/hudl/fargo\"\n"
},
{
"path": "sd/factory.go",
"chars": 617,
"preview": "package sd\n\nimport (\n\t\"io\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n)\n\n// Factory is a function that converts an instance stri"
},
{
"path": "sd/instancer.go",
"chars": 1594,
"preview": "package sd\n\n// Event represents a push notification generated from the underlying service discovery\n// implementation. I"
},
{
"path": "sd/internal/instance/cache.go",
"chars": 2209,
"preview": "package instance\n\nimport (\n\t\"reflect\"\n\t\"sort\"\n\t\"sync\"\n\n\t\"github.com/go-kit/kit/sd\"\n)\n\n// Cache keeps track of resource i"
},
{
"path": "sd/internal/instance/cache_test.go",
"chars": 3236,
"preview": "package instance\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"gi"
},
{
"path": "sd/lb/balancer.go",
"chars": 327,
"preview": "package lb\n\nimport (\n\t\"errors\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n)\n\n// Balancer yields endpoints according to some heur"
},
{
"path": "sd/lb/doc.go",
"chars": 244,
"preview": "// Package lb implements the client-side load balancer pattern. When combined\n// with a service discovery system of reco"
},
{
"path": "sd/lb/random.go",
"chars": 586,
"preview": "package lb\n\nimport (\n\t\"math/rand\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/kit/sd\"\n)\n\n// NewRandom returns"
},
{
"path": "sd/lb/random_test.go",
"chars": 1190,
"preview": "package lb\n\nimport (\n\t\"context\"\n\t\"math\"\n\t\"testing\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/kit/sd\"\n)\n\nfun"
},
{
"path": "sd/lb/retry.go",
"chars": 3482,
"preview": "package lb\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n)\n\n// RetryError is an erro"
},
{
"path": "sd/lb/retry_test.go",
"chars": 4593,
"preview": "package lb_test\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit"
},
{
"path": "sd/lb/round_robin.go",
"chars": 623,
"preview": "package lb\n\nimport (\n\t\"sync/atomic\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"github.com/go-kit/kit/sd\"\n)\n\n// NewRoundRobin r"
},
{
"path": "sd/lb/round_robin_test.go",
"chars": 1884,
"preview": "package lb\n\nimport (\n\t\"context\"\n\t\"reflect\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n"
},
{
"path": "sd/registrar.go",
"chars": 509,
"preview": "package sd\n\n// Registrar registers instance information to a service discovery system when\n// an instance becomes alive "
},
{
"path": "sd/zk/client.go",
"chars": 7544,
"preview": "package zk\n\nimport (\n\t\"errors\"\n\t\"net\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/go-zookeeper/zk\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// "
},
{
"path": "sd/zk/client_test.go",
"chars": 3919,
"preview": "package zk\n\nimport (\n\t\"bytes\"\n\t\"testing\"\n\t\"time\"\n\n\tstdzk \"github.com/go-zookeeper/zk\"\n\n\t\"github.com/go-kit/log\"\n)\n\nfunc "
},
{
"path": "sd/zk/doc.go",
"chars": 89,
"preview": "// Package zk provides Instancer and Registrar implementations for ZooKeeper.\npackage zk\n"
},
{
"path": "sd/zk/instancer.go",
"chars": 2372,
"preview": "package zk\n\nimport (\n\t\"github.com/go-zookeeper/zk\"\n\n\t\"github.com/go-kit/kit/sd\"\n\t\"github.com/go-kit/kit/sd/internal/inst"
},
{
"path": "sd/zk/instancer_test.go",
"chars": 2993,
"preview": "package zk\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/go-kit/kit/sd\"\n)\n\nvar _ sd.Instancer = (*Instancer)(nil) // API ch"
},
{
"path": "sd/zk/integration_test.go",
"chars": 4955,
"preview": "// +build integration\n\npackage zk\n\nimport (\n\t\"bytes\"\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n\n\tstdzk \"github.com/go-zookeeper/zk\"\n)\n\nva"
},
{
"path": "sd/zk/logwrapper.go",
"chars": 625,
"preview": "package zk\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/go-zookeeper/zk\"\n\n\t\"github.com/go-kit/log\"\n)\n\n// wrapLogger wraps a Go kit log"
},
{
"path": "sd/zk/registrar.go",
"chars": 1408,
"preview": "package zk\n\nimport \"github.com/go-kit/log\"\n\n// Registrar registers service instance liveness information to ZooKeeper.\nt"
},
{
"path": "sd/zk/util_test.go",
"chars": 2583,
"preview": "package zk\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/go-zookeeper/zk\"\n\n\t\"github.com/go-kit/kit/endp"
},
{
"path": "tracing/README.md",
"chars": 3984,
"preview": "# package tracing\n\n`package tracing` provides [Dapper]-style request tracing to services.\n\n## Rationale\n\nRequest tracing"
},
{
"path": "tracing/doc.go",
"chars": 370,
"preview": "// Package tracing provides helpers and bindings for distributed tracing.\n//\n// As your infrastructure grows, it becomes"
},
{
"path": "tracing/opencensus/doc.go",
"chars": 349,
"preview": "// Package opencensus provides Go kit integration to the OpenCensus project.\n// OpenCensus is a single distribution of l"
},
{
"path": "tracing/opencensus/endpoint.go",
"chars": 2745,
"preview": "package opencensus\n\nimport (\n\t\"context\"\n\t\"strconv\"\n\n\t\"go.opencensus.io/trace\"\n\n\t\"github.com/go-kit/kit/endpoint\"\n\t\"githu"
},
{
"path": "tracing/opencensus/endpoint_options.go",
"chars": 2284,
"preview": "package opencensus\n\nimport (\n\t\"context\"\n\n\t\"go.opencensus.io/trace\"\n)\n\n// EndpointOptions holds the options for tracing a"
},
{
"path": "tracing/opencensus/endpoint_test.go",
"chars": 4876,
"preview": "package opencensus_test\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"testing\"\n\t\"time\"\n\n\t\"go.opencensus.io/trace\"\n\n\t\"github.com/go-ki"
},
{
"path": "tracing/opencensus/grpc.go",
"chars": 3523,
"preview": "package opencensus\n\nimport (\n\t\"context\"\n\n\t\"go.opencensus.io/trace\"\n\t\"go.opencensus.io/trace/propagation\"\n\t\"google.golang"
},
{
"path": "tracing/opencensus/grpc_test.go",
"chars": 4733,
"preview": "package opencensus_test\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"testing\"\n\n\t\"go.opencensus.io/trace\"\n\t\"go.opencensus.io/trace/pr"
},
{
"path": "tracing/opencensus/http.go",
"chars": 4100,
"preview": "package opencensus\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"go.opencensus.io/plugin/ochttp\"\n\t\"go.opencensus.io/plugin/ochttp/"
},
{
"path": "tracing/opencensus/http_test.go",
"chars": 4678,
"preview": "package opencensus_test\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"net/url\"\n\t\"testing\"\n\n\t\"go.open"
},
{
"path": "tracing/opencensus/jsonrpc.go",
"chars": 4423,
"preview": "package opencensus\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"go.opencensus.io/plugin/ochttp\"\n\t\"go.opencensus.io/plugin/ochttp/"
},
{
"path": "tracing/opencensus/jsonrpc_test.go",
"chars": 5096,
"preview": "package opencensus_test\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httptest\""
},
{
"path": "tracing/opencensus/opencensus_test.go",
"chars": 411,
"preview": "package opencensus_test\n\nimport (\n\t\"sync\"\n\n\t\"go.opencensus.io/trace\"\n)\n\ntype recordingExporter struct {\n\tmu sync.Mutex"
},
{
"path": "tracing/opencensus/tracer_options.go",
"chars": 2121,
"preview": "package opencensus\n\nimport (\n\t\"go.opencensus.io/plugin/ochttp/propagation/b3\"\n\t\"go.opencensus.io/trace\"\n\t\"go.opencensus."
},
{
"path": "tracing/opentracing/doc.go",
"chars": 255,
"preview": "// Package opentracing provides Go kit integration to the OpenTracing project.\n// OpenTracing implements a general purpo"
},
{
"path": "tracing/opentracing/endpoint.go",
"chars": 3450,
"preview": "package opentracing\n\nimport (\n\t\"context\"\n\t\"strconv\"\n\n\t\"github.com/opentracing/opentracing-go\"\n\totext \"github.com/opentra"
},
{
"path": "tracing/opentracing/endpoint_options.go",
"chars": 2462,
"preview": "package opentracing\n\nimport (\n\t\"context\"\n\n\t\"github.com/opentracing/opentracing-go\"\n)\n\n// EndpointOptions holds the optio"
},
{
"path": "tracing/opentracing/endpoint_test.go",
"chars": 10638,
"preview": "package opentracing_test\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/opentracing/o"
},
{
"path": "tracing/opentracing/grpc.go",
"chars": 2354,
"preview": "package opentracing\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"strings\"\n\n\t\"github.com/opentracing/opentracing-go\"\n\t\"githu"
}
]
// ... and 88 more files (download for full content)
About this extraction
This page contains the full source code of the go-kit/kit GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 288 files (869.1 KB), approximately 269.4k tokens, and a symbol index with 1706 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.