From 908c5cf02cfdfa19a4da1c57de0002675d214c98 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 2 Jul 2021 16:52:25 +0200 Subject: [PATCH 1/2] docs: fix example links Signed-off-by: Mark Sagi-Kazar --- tracing/README.md | 2 +- tracing/zipkin/README.md | 2 +- transport/grpc/README.md | 6 +++--- transport/netrpc/README.md | 2 +- transport/thrift/README.md | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tracing/README.md b/tracing/README.md index ff84d57d8..a6f6ac30d 100644 --- a/tracing/README.md +++ b/tracing/README.md @@ -70,7 +70,7 @@ Go kit instrumentation can be found in [opentelemetry-go-contrib] which is a central repository of instrumentation libraries. [Dapper]: http://research.google.com/pubs/pub36356.html -[addsvc]:https://github.com/go-kit/kit/tree/master/examples/addsvc +[addsvc]: https://github.com/go-kit/examples/tree/master/addsvc [README]: https://github.com/go-kit/kit/blob/master/tracing/zipkin/README.md [OpenTracing]: http://opentracing.io diff --git a/tracing/zipkin/README.md b/tracing/zipkin/README.md index a37771534..727652a8a 100644 --- a/tracing/zipkin/README.md +++ b/tracing/zipkin/README.md @@ -48,7 +48,7 @@ tracer, err = zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(localEndpoint) ``` [zipkin-go]: https://github.com/openzipkin/zipkin-go -[addsvc]:https://github.com/go-kit/kit/tree/master/examples/addsvc +[addsvc]: https://github.com/go-kit/examples/tree/master/addsvc [Log]: https://github.com/go-kit/kit/tree/master/log ### Tracing Resources diff --git a/transport/grpc/README.md b/transport/grpc/README.md index b6c1ce239..d269cddb2 100644 --- a/transport/grpc/README.md +++ b/transport/grpc/README.md @@ -13,7 +13,7 @@ Using gRPC and go-kit together is very simple. First, define your service using protobuf3. This is explained [in gRPC documentation](http://www.grpc.io/docs/#defining-a-service). See -[add.proto](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a1ae9d317353412d1d27/examples/addsvc/pb/add.proto) +[addsvc.proto](https://github.com/go-kit/examples/blob/master/addsvc/pb/addsvc.proto) for an example. Make sure the proto definition matches your service's go-kit (interface) definition. @@ -43,12 +43,12 @@ protoc add.proto --go_out=plugins=grpc:. Finally, write a tiny binding from your service definition to the gRPC definition. It's a simple conversion from one domain to another. See -[grpc_binding.go](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a1ae9d317353412d1d27/examples/addsvc/grpc_binding.go) +[grpc.go](https://github.com/go-kit/examples/blob/master/addsvc/pkg/addtransport/grpc.go) for an example. That's it! The gRPC binding can be bound to a listener and serve normal gRPC requests. And within your service, you can use standard go-kit components and idioms. -See [addsvc](https://github.com/go-kit/examples/blob/master/addsvc/) for +See [addsvc](https://github.com/go-kit/examples/tree/master/addsvc/) for a complete working example with gRPC support. And remember: go-kit services can support multiple transports simultaneously. diff --git a/transport/netrpc/README.md b/transport/netrpc/README.md index d89950184..e6f91d8c2 100644 --- a/transport/netrpc/README.md +++ b/transport/netrpc/README.md @@ -10,5 +10,5 @@ See [netrpc_binding.go](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a That's it! The net/rpc binding can be registered to a name, and bound to an HTTP handler, the same as any other net/rpc endpoint. And within your service, you can use standard Go kit components and idioms. -See [addsvc](https://github.com/go-kit/kit/tree/master/examples/addsvc) for a complete working example with net/rpc support. +See [addsvc](https://github.com/go-kit/examples/tree/master/addsvc) for a complete working example with net/rpc support. And remember: Go kit services can support multiple transports simultaneously. diff --git a/transport/thrift/README.md b/transport/thrift/README.md index 04cd5ae44..b7533194a 100644 --- a/transport/thrift/README.md +++ b/transport/thrift/README.md @@ -6,7 +6,7 @@ And using Thrift with Go kit is very simple. First, define your service in the Thrift IDL. The [Thrift IDL documentation](https://thrift.apache.org/docs/idl) provides more details. -See [add.thrift](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a1ae9d317353412d1d27/examples/addsvc/_thrift/add.thrift) for an example. +See [addsvc.thrift](https://github.com/go-kit/examples/blob/master/addsvc/thrift/addsvc.thrift) for an example. Make sure the Thrift definition matches your service's Go kit (interface) definition. Next, [download Thrift](https://thrift.apache.org/download) and [install the compiler](https://thrift.apache.org/docs/install/). @@ -22,11 +22,11 @@ thrift -r --gen go:package_prefix=github.com/my-org/my-repo/thrift/gen-go/ add.t Finally, write a tiny binding from your service definition to the Thrift definition. It's a straightforward conversion from one domain to the other. -See [thrift_binding.go](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a1ae9d317353412d1d27/examples/addsvc/thrift_binding.go) for an example. +See [thrift.go](https://github.com/go-kit/examples/blob/master/addsvc/pkg/addtransport/thrift.go) for an example. That's it! The Thrift binding can be bound to a listener and serve normal Thrift requests. And within your service, you can use standard Go kit components and idioms. Unfortunately, setting up a Thrift listener is rather laborious and nonidiomatic in Go. -Fortunately, [addsvc](https://github.com/go-kit/kit/tree/master/examples/addsvc) is a complete working example with Thrift support. +Fortunately, [addsvc](https://github.com/go-kit/examples/tree/master/addsvc) is a complete working example with Thrift support. And remember: Go kit services can support multiple transports simultaneously. From 4c47fd8c8a3932e395872313127269c68f7ceeb8 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 2 Jul 2021 16:52:35 +0200 Subject: [PATCH 2/2] remove examples from gitignore Signed-off-by: Mark Sagi-Kazar --- .gitignore | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.gitignore b/.gitignore index 6062401c1..ff53c9ea8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,3 @@ -examples/addsvc/addsvc -examples/addsvc/client/client -examples/apigateway/apigateway -examples/profilesvc/profilesvc -examples/stringsvc1/stringsvc1 -examples/stringsvc2/stringsvc2 -examples/stringsvc3/stringsvc3 *.coverprofile # Compiled Object files, Static and Dynamic libs (Shared Objects)