proxy.golang.org : github.com/chai2010/protorpc : v1.0.0
Package protorpc implements a Protobuf-RPC ClientCodec and ServerCodec for the rpc package. To install it, you must first have Go (version 1) installed (see http://golang.org/doc/install). Next, install the standard protocol buffer implementation from http://github.com/google/protobuf/; you must be running version 2.3 or higher. Finally run to install the support library and protocol compiler. Here is a simple proto file("arith.pb/arith.proto"): Then use "protoc-gen-go" to generate "arith.pb.go" file: Use "protoc-gen-protorpc" to generate "arith.pb.protorpc.go" file (include stub code): The server calls (for TCP service): At this point, clients can see a service "Arith" with methods "ArithService.Multiply" and "ArithService.Divide". To invoke one, a client first dials the server: Then it can make a remote call with stub: More example: Report bugs to <chaishushan@gmail.com>. Thanks!
Registry -
Documentation -
Download -
JSON
purl: pkg:golang/github.com/chai2010/protorpc@v1.0.0
Published:
Indexed:
Related tag:
v1.0.0
- "github.com/golang/protobuf" v1.0.0
- "github.com/golang/snappy" v0.0.0-20170215233205-553a64147049