protoc-gen-go-netrpc

command module
v0.0.0-...-bec960f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

README

protoc-gen-go-netrpc

This tool generates Go language bindings of services in protobuf definition files for net/rpc.

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. To turn off this behavior, set the option require_unimplemented_servers=false. E.g.:

  protoc --go-netrpc_out=. --go-netrpc_opt=require_unimplemented_servers=false[,other options...] \

Note that this is not recommended.

Documentation

Overview

protoc-gen-go-grpc is a plugin for the Google protocol buffer compiler to generate Go code. Install it by building this program and making it accessible within your PATH with the name:

protoc-gen-go-grpc

The 'go-grpc' suffix becomes part of the argument for the protocol compiler, such that it can be invoked as:

protoc --go-grpc_out=. path/to/file.proto

This generates Go service definitions for the protocol buffer defined by file.proto. With that input, the output will be written to:

path/to/file_grpc.pb.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL