protoc-gen-grpc

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

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 6 Imported by: 0

README

protoc-gen-grpc

proto 生成 grpc 文件,支持 goole 原生 _grpc.pb.go、gokit-rpc。兼容 protoc 命令。
编译
# 方式一
go get -u github.com/charlesbases/protoc-gen-grpc

# 方式二
go clone https://github.com/charlesbases/protoc-gen-grpc.git
cd protoc-gen-grpc
make
参数
--plugin: 生成的 rpc 文件类别,支持 grpc (google原生,default)、gokit。
使用
# google-rpc
protoc -I=. --go_out=paths=source_relative:. --grpc_out=paths=source_relative:. pb/*.proto

# gokit-rpc
protoc -I=. --go_out=paths=source_relative:. --grpc_out=plugin=gokit,paths=source_relative:. pb/*.proto

Examples

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pb

Jump to

Keyboard shortcuts

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