Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

proxy.golang.org : github.com/weiwenchen2022/protorpc

Package protorpc implements a Protobuf-RPC ClientCodec and ServerCodec for the rpc package. Prerequisites: Go, any one of the three latest major releases of Go[https://go.dev/doc/devel/release]. For installation instructions, see Go’s Getting Started[https://go.dev/doc/install] guide. Protocol buffer[https://protobuf.dev/] compiler, protoc, version 3[https://protobuf.dev/programming-guides/proto3/]. Go plugins for the protocol compiler: 1. Install the protocol compiler plugins for Go using the following commands: $ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest $ go install github.com/weiwenchen2022/protorpc/cmd/protoc-gen-go-grpc@latest 2. Update your PATH so that the protoc compiler can find the plugins: $ export PATH="$PATH:$(go env GOPATH)/bin" Here is a simple example. Define a service in a .proto file (helloworld/helloworld.proto): Change to the example directory: Run the following command: This will regenerate the helloworld/helloworld.pb.go and helloworld/helloworld_netrpc.pb.go files, which contain: The server calls (for TCP service): At this point, clients can see a service "Greeter" with methods "Greeter.SayHello". To invoke one, a client first dials the server: Then it can make a remote call: or

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/weiwenchen2022/protorpc
Keywords: go, library, protocol-buffers, rpc
License: BSD-3-Clause
Latest release: 10 months ago
First release: 10 months ago
Namespace: github.com/weiwenchen2022
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 11 days ago

    Loading...
    Readme
    Loading...