1
0
mirror of https://github.com/go-kit/kit.git synced 2025-07-17 01:12:38 +02:00
Commit Graph

1532 Commits

Author SHA1 Message Date
7ea682bac2 Fix tracing tests by replacing test.com endpoint with httpbin.org (#952) 2020-02-01 05:48:07 +01:00
5d467ee23f README: updates 2020-01-12 19:53:14 +01:00
9f139f177c Merge pull request #945 from go-kit/go-mod
Add go.mod file
2020-01-10 20:56:02 -05:00
362dd5cb62 Remove unnecessary indirect required modules
Performed by deleteding all lines marked // indirect in the go.mod file
and running go mod tidy to restore the required entries.

The entries ultimately removed were probably a remnant of a prior state
of the go.mod file in this sequence.
2020-01-05 23:36:38 -05:00
b85c013271 Update imports to casbin/v2 2020-01-05 23:24:07 -05:00
eed6ce217b Add initial go.mod file
The go.mod file was generated with the following sequence of commands:

go mod init
go mod tidy

The first try resulted in two problems.

- One problem was fixed by updating the import path of nats-server to
  use semantic import v2 in transport/nats/subscriber_test.go.
- The other problem was fixed by changing the required version of
  go.etcd.io/etcd to v0.0.0-20191023171146-3cf2f69b5738 which
  corresponds to v3.4.3. We cannot use the v3.4.3 tag directly because
  of problems within the etcd repo itself described in
  https://github.com/etcd-io/etcd/issues/11154

After those two changes a second go mod tidy succeeds and produces the
go.mod file included in this commit.
2020-01-05 23:14:52 -05:00
7ddd1d2470 Clarify rate limiter expressions in addsvc example (#943)
Rate limiting examples might be a bit confusing when Every
method is used https://github.com/go-kit/kit/issues/698.
One could expect to see throttling expressed as
a number of requests per unit of time whereas another would see it
as an interval between requests.
2019-12-31 20:00:03 -07:00
88e8262646 circle.yml: always use latest Go (#944) 2019-12-31 19:39:26 -07:00
c0f8510631 docs: removed mention about ServiceMiddleware (#936) 2019-11-15 00:29:29 +01:00
9f5354e50d Fix typo: "construts" --> "constructs" (#925) 2019-10-18 14:22:45 +02:00
113702bd9e Create FUNDING.yml 2019-10-09 21:05:35 +02:00
913ff7dc1f Disable HTML escaping in JSON Logger (#914) 2019-10-07 19:51:01 -04:00
76396d15c4 update_deps.bash: breakfixes 2019-10-06 19:57:57 +02:00
0fadbe99dd Introduce ErrorHandlerFunc (#915) 2019-10-03 20:34:22 +02:00
f72181f3a8 Fix build (#917)
* make go vet happy (renamed example function for syslog)

* adjust Zipkin OpenTracing example to use the new bridge version of zipkin-go-opentracing

* fix expected output from kit-gen due to change in gofmt handling of imports
2019-10-03 18:01:51 +02:00
dc489b75b9 Consider SRV records with port 0 as an error (#900)
* sd/dnssrv: fix Instancer method receivers

* sd/dnssrv: SRV record with port 0 is an error

* sd/dnssrv: test for SRV port zero issue

* .build.yml: update and fix
2019-08-12 10:42:10 -07:00
b3415e3b71 Small fixes to fight entropy and bit-rot (#901)
* .build.yml: update and fix

* auth/casbin: update to accommodate change in dep

* .travis.yml: 1.x and tip
2019-08-12 10:17:28 -07:00
150a65a7ec Update Gin framework homepage url (#888) v0.9.0 2019-06-24 13:05:17 +02:00
7d4de0a270 .build.yml: 1.12 -> 1.12.6 2019-06-17 15:16:51 +01:00
ab8826b052 dogstatsd: Drop metrics according to sample rate (#884)
Sample rate is for allowing to lower traffic generated by
the statsd packets so the observations need to be dropped.
statsd server will multiple the metrics with the inverse
of sample rate to compenstate.

Fixes #778
2019-06-14 17:53:12 +02:00
aba2075dab metrics/prometheus: fix for latest HEAD (#885)
github.com/prometheus/client_golang/prometheus recently removed some
deprecated functions including UninstrumentedHandler, and changed the
way summaries work: now, by default, they don't report any quantiles,
and you have to specify precisely which quantiles you want to see.
2019-06-12 18:31:20 +02:00
9886ec2023 sd/{etcd,etcdv3}: disable flaky integration tests (#883) 2019-06-06 12:19:11 +02:00
13ec75b01c Update imports for NATS (#881)
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-06-06 11:40:30 +02:00
e75cc1ab02 add test that reproduces data race in sd.endpointCache.updateCache() (#865) 2019-05-30 17:11:02 +02:00
07d89a2775 Use given context in NATS endpoint (#876)
Previous implementation used a new background context
which prevented context cancellation.
2019-05-29 19:26:36 +02:00
7faed7f999 Update cloudwatch2 to latest upstream API. (#878)
A name change in the upstream AWS SDK caused breakage
in cloudwatch2 metrics. This commits updates our usage
of the API to match the new upstream naming.
2019-05-29 11:19:14 +02:00
fbab14bd4c Some code improvements (#868)
* Simplify some functions.
* strings.ToLower comparison changed to strings.EqualFold.
2019-05-06 20:12:42 +02:00
da68e76406 metrics/internal/lv: fix len comparison 2019-04-30 18:12:09 +02:00
f0d5f8abae fix port assignment (#866) 2019-04-29 09:36:22 +02:00
3c77e8c378 Implement transport level error handlers (#863)
* Add error handler implementation to the log package

* Add error handler to http transport

* Add error handler to amqp transport

* Add error handler to awslambda transport

* Add error handler to grpc transport

* Add error handler to nats transport

* Move error handler interfaces to transport package

* Move log error handler to transport package

* Remove error logger precedence

* Improve documentation wording

* Adjust transport package documentation

* Remove ignore error

* Update examples

* Add context to the error handler signature
2019-04-24 10:12:51 +02:00
22a2d43a4f fix context in Send() (#857) 2019-04-16 13:32:59 +02:00
ec9b73a8e9 Add a log adapter for zap.Logger (#855) 2019-04-09 22:24:05 -04:00
8c84d8847d fix: ProtectedEphemeralSequential in the wrong zk path (#849)
```golang
register := zk.NewRegistrar(client,zk.Service{
	Path: "/services/hello",
	Name: "abc",
	Data: []byte("http://127.0.0.1:8080"),
},logger)
```
> It will be created in zk
```sh
[zk: localhost:2181(CONNECTED) 161] ls /services/hello
[_c_c83db041ac654566228b72cbd541bcb5-abc0000000006, abc]
```
**/services/hello/_c_c83db041ac654566228b72cbd541bcb5** is correct
**/services/hello/abc** is empty node

```golang
//will get 0 instance
zk.NewInstancer(client,"/services/hello/abc",logger)
//will get 2 instances, one of them is <nil>
zk.NewInstancer(client,"/services/hello",logger)
```
In my understanding, [CreateProtectedEphemeralSequential](https://github.com/go-kit/kit/blob/master/sd/zk/client.go#L241) function will be created under `/services/hello/abc`

So is this a bug? Or there's something wrong with my usage?
2019-04-06 17:46:31 -07:00
40f35b54dd README: add a line break for the long header 2019-03-26 16:49:56 -07:00
62b26ab5b8 adds NopResponse to AMQP transport (#850) 2019-03-26 14:31:51 -07:00
53b763c5d9 Add amqp.Delivery to the request func in order to have the ability to change incoming message before decode function in case of zipkin context (#802) 2019-03-20 14:14:38 -07:00
zii
a7fe87b127 fix bug #799 (#848)
* fix bug #799

I have a test. Just close etcd, after 10 seconds, it will dead loop crazy, cpu100%.
Need add a little guard code.

* Update client.go
2019-03-12 16:54:04 -07:00
90f6ad6713 sd/etcdv3: serve the keepalive response channel (#803)
read and discard keepalive response,
make etcd library not to complain
fix #799
2019-03-10 20:28:45 -07:00
aef3868b06 README: add builds.sr.ht status badge (#846) 2019-03-05 14:28:37 -08:00
15ff8c232d log/level: improve examples (#845)
* log/level: improve examples

* log: mention package level in README

* log/level: example line numbers changed
2019-03-05 13:16:00 -08:00
102522abed builds.sr.ht (#842)
* .build.yml: first draft sr.ht integration

* .build.yml: working, taken from web

* .build.yml: previous version was failing, will this work?

* Revert ".build.yml: previous version was failing, will this work?"

This reverts commit 2dbc4239e1.

* .build.yml: maybe this?
2019-03-04 14:58:10 -08:00
a8cc1630e0 fix kitgen test in the windows (#840) 2019-02-24 20:16:59 -05:00
048aff06f8 #814 Add Transport Layer: AWS Lambda (#815)
* base serving, encode, decode functions

* logger

* add before encode options

* add ServerAfter functions

* add error encoder

* add finalizer

* add basic happy flow

* add ServerBefore tests

* test error flow on decoding stage

* complete the test scenarios

* refactor into more generic support by implementing lambda.Handler

* testing: ErrorEncoder to reflect behavior of encoding error as payload for AWS APIGateway event handling, as if we return error not nil to lambda it shall treated as error, and the API response would not be pretty

* add wrapper

* capitalize Lambda

* add particle an

* tidy up doc words as per suggested

* Update transport/awslambda/request_response_funcs.go

Co-Authored-By: suekto-andreas <suekto.andreas@gmail.com>

* Update transport/awslambda/request_response_funcs.go

Co-Authored-By: suekto-andreas <suekto.andreas@gmail.com>

* Update transport/awslambda/server.go

Co-Authored-By: suekto-andreas <suekto.andreas@gmail.com>

* Update transport/awslambda/request_response_funcs.go

Co-Authored-By: suekto-andreas <suekto.andreas@gmail.com>

* refactor multiline to keep them 1 per line

* remove \n from test

* defines a DefaultErrorEncoder, refactor the handling of errorEncoder during Invoke

* refactor Server into Handler

* remove wrapper

* refactor variable s into h

* simplify the return of errorEncoder

* Update transport/awslambda/handler.go

Co-Authored-By: suekto-andreas <suekto.andreas@gmail.com>

* Update transport/awslambda/handler.go

Co-Authored-By: suekto-andreas <suekto.andreas@gmail.com>

* Update transport/awslambda/handler.go

Co-Authored-By: suekto-andreas <suekto.andreas@gmail.com>

* DefaultErrorEncoder unit test
2019-02-21 21:50:53 -08:00
e9fad41c03 Make Send/Write Loop context aware (#837) 2019-02-19 15:25:32 -08:00
10f464fb11 Fix error formatting based on best practices from Code Review Comments (#832)
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-02-05 11:34:09 -08:00
099aba3da8 fix(kitgen): normalize backSlashes in path (#831)
add filepath.ToSlash() to convert backSlashes to forward slashes in path

fixes: #740
2019-02-01 09:54:23 -08:00
6b191291f7 Merge pull request #830 from rueian/use-opencensus-default-sampler
Use opencensus's DefaultSampler instead of AlwaysSampler as default
2019-01-25 10:04:56 +01:00
362a2ebfc6 Use opencensus's DefaultSampler instead of setting AlwaysSampler as defult in HTTPServerTrace and GRPCServerTrace 2019-01-24 15:30:31 +08:00
8a8a1bb870 Import rewrite (#826) 2019-01-17 10:46:52 -08:00
1e404df823 Merge pull request #821 from nboukeffa/jaeger-span-default-format
Change span injection/extraction from HTTP request
2019-01-09 15:40:17 +01:00