auxo RPC support many codecs, if you use Protocol Buffers codec, you can generate contract codes from Protocol Buffers service definition files with protoc-gen-auxo.
Use go install
to install the code generator:
go install github.com/cuigh/protoc-gen-auxo@latest
You will also need:
- protoc, the protobuf compiler. You need version 3+.
- protoc-gen-go, the Go protobuf generator plugin. Get this with
go get github.com/golang/protobuf/protoc-gen-go
.
Just like grpc:
protoc --go_out=. --auxo_out=. --go_opt=paths=source_relative --auxo_opt=paths=source_relative hello.proto
Service interfaces and client proxies were generated into a separate file [name].auxo.go
:
hello.auxo.go
hello.pb.go
hello.proto