tree: 6d2cc756a8319b6beed321783a618c88df3c9fd9 [path history] [tgz]
  1. go.mod
  2. go.sum
  3. grpc.go
  4. main.go
  5. README.md
cmd/protoc-gen-go-grpc/README.md

protoc-gen-go-grpc

This tool generates Go language bindings of services in protobuf definition files for gRPC. For usage information, please see our quick start guide.

Future-proofing services

By default, to register services using the methods generated by this tool, the service implementations must embed the corresponding Unimplemented<ServiceName>Server for future compatibility. This is a behavior change from the grpc code generator previously included with protoc-gen-go. To restore this behavior, set the option requireUnimplementedServers=false. E.g.:

  protoc --go-grpc_out=requireUnimplementedServers=false[,other options...]:. \

Note that this is not recommended, and the option is only provided to restore backward compatibility with previously-generated code.