Merge pull request #1129 from sagikazarmark/improve-example-references
Improve example references
Márk Sági-Kazár authored 1 year, 8 months ago
GitHub committed 1 year, 8 months ago
0 | |
examples/addsvc/addsvc
|
1 | |
examples/addsvc/client/client
|
2 | |
examples/apigateway/apigateway
|
3 | |
examples/profilesvc/profilesvc
|
4 | |
examples/stringsvc1/stringsvc1
|
5 | |
examples/stringsvc2/stringsvc2
|
6 | |
examples/stringsvc3/stringsvc3
|
7 | 0 |
*.coverprofile
|
8 | 1 |
|
9 | 2 |
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
69 | 69 |
which is a central repository of instrumentation libraries.
|
70 | 70 |
|
71 | 71 |
[Dapper]: http://research.google.com/pubs/pub36356.html
|
72 | |
[addsvc]:https://github.com/go-kit/kit/tree/master/examples/addsvc
|
|
72 |
[addsvc]: https://github.com/go-kit/examples/tree/master/addsvc
|
73 | 73 |
[README]: https://github.com/go-kit/kit/blob/master/tracing/zipkin/README.md
|
74 | 74 |
|
75 | 75 |
[OpenTracing]: http://opentracing.io
|
47 | 47 |
```
|
48 | 48 |
|
49 | 49 |
[zipkin-go]: https://github.com/openzipkin/zipkin-go
|
50 | |
[addsvc]:https://github.com/go-kit/kit/tree/master/examples/addsvc
|
|
50 |
[addsvc]: https://github.com/go-kit/examples/tree/master/addsvc
|
51 | 51 |
[Log]: https://github.com/go-kit/kit/tree/master/log
|
52 | 52 |
|
53 | 53 |
### Tracing Resources
|
12 | 12 |
First, define your service using protobuf3. This is explained
|
13 | 13 |
[in gRPC documentation](http://www.grpc.io/docs/#defining-a-service).
|
14 | 14 |
See
|
15 | |
[add.proto](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a1ae9d317353412d1d27/examples/addsvc/pb/add.proto)
|
|
15 |
[addsvc.proto](https://github.com/go-kit/examples/blob/master/addsvc/pb/addsvc.proto)
|
16 | 16 |
for an example. Make sure the proto definition matches your service's go-kit
|
17 | 17 |
(interface) definition.
|
18 | 18 |
|
|
42 | 42 |
Finally, write a tiny binding from your service definition to the gRPC
|
43 | 43 |
definition. It's a simple conversion from one domain to another.
|
44 | 44 |
See
|
45 | |
[grpc_binding.go](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a1ae9d317353412d1d27/examples/addsvc/grpc_binding.go)
|
|
45 |
[grpc.go](https://github.com/go-kit/examples/blob/master/addsvc/pkg/addtransport/grpc.go)
|
46 | 46 |
for an example.
|
47 | 47 |
|
48 | 48 |
That's it!
|
49 | 49 |
The gRPC binding can be bound to a listener and serve normal gRPC requests.
|
50 | 50 |
And within your service, you can use standard go-kit components and idioms.
|
51 | |
See [addsvc](https://github.com/go-kit/examples/blob/master/addsvc/) for
|
|
51 |
See [addsvc](https://github.com/go-kit/examples/tree/master/addsvc/) for
|
52 | 52 |
a complete working example with gRPC support. And remember: go-kit services
|
53 | 53 |
can support multiple transports simultaneously.
|
9 | 9 |
That's it!
|
10 | 10 |
The net/rpc binding can be registered to a name, and bound to an HTTP handler, the same as any other net/rpc endpoint.
|
11 | 11 |
And within your service, you can use standard Go kit components and idioms.
|
12 | |
See [addsvc](https://github.com/go-kit/kit/tree/master/examples/addsvc) for a complete working example with net/rpc support.
|
|
12 |
See [addsvc](https://github.com/go-kit/examples/tree/master/addsvc) for a complete working example with net/rpc support.
|
13 | 13 |
And remember: Go kit services can support multiple transports simultaneously.
|
5 | 5 |
|
6 | 6 |
First, define your service in the Thrift IDL.
|
7 | 7 |
The [Thrift IDL documentation](https://thrift.apache.org/docs/idl) provides more details.
|
8 | |
See [add.thrift](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a1ae9d317353412d1d27/examples/addsvc/_thrift/add.thrift) for an example.
|
|
8 |
See [addsvc.thrift](https://github.com/go-kit/examples/blob/master/addsvc/thrift/addsvc.thrift) for an example.
|
9 | 9 |
Make sure the Thrift definition matches your service's Go kit (interface) definition.
|
10 | 10 |
|
11 | 11 |
Next, [download Thrift](https://thrift.apache.org/download) and [install the compiler](https://thrift.apache.org/docs/install/).
|
|
21 | 21 |
|
22 | 22 |
Finally, write a tiny binding from your service definition to the Thrift definition.
|
23 | 23 |
It's a straightforward conversion from one domain to the other.
|
24 | |
See [thrift_binding.go](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a1ae9d317353412d1d27/examples/addsvc/thrift_binding.go) for an example.
|
|
24 |
See [thrift.go](https://github.com/go-kit/examples/blob/master/addsvc/pkg/addtransport/thrift.go) for an example.
|
25 | 25 |
|
26 | 26 |
That's it!
|
27 | 27 |
The Thrift binding can be bound to a listener and serve normal Thrift requests.
|
28 | 28 |
And within your service, you can use standard Go kit components and idioms.
|
29 | 29 |
Unfortunately, setting up a Thrift listener is rather laborious and nonidiomatic in Go.
|
30 | |
Fortunately, [addsvc](https://github.com/go-kit/kit/tree/master/examples/addsvc) is a complete working example with Thrift support.
|
|
30 |
Fortunately, [addsvc](https://github.com/go-kit/examples/tree/master/addsvc) is a complete working example with Thrift support.
|
31 | 31 |
And remember: Go kit services can support multiple transports simultaneously.
|