OSDN Git Service

delete miner
[bytom/vapor.git] / vendor / github.com / go-kit / kit / transport / netrpc / README.md
1 # net/rpc
2
3 [net/rpc](https://golang.org/pkg/net/rpc) is an RPC transport that's part of the Go standard library.
4 It's a simple and fast transport that's appropriate when all of your services are written in Go.
5
6 Using net/rpc with Go kit is very simple.
7 Just write a simple binding from your service definition to the net/rpc definition.
8 See [netrpc_binding.go](https://github.com/go-kit/kit/blob/ec8b02591ee873433565a1ae9d317353412d1d27/examples/addsvc/netrpc_binding.go) for an example.
9
10 That's it!
11 The net/rpc binding can be registered to a name, and bound to an HTTP handler, the same as any other net/rpc endpoint.
12 And within your service, you can use standard Go kit components and idioms.
13 See [addsvc](https://github.com/go-kit/kit/tree/master/examples/addsvc) for a complete working example with net/rpc support.
14 And remember: Go kit services can support multiple transports simultaneously.