protoc-gen-hb-grpc

command
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

README

protoc-gen-hb-grpc

# install
go get -u github.com/hb-go/grpc-contrib/protoc-gen-hb-grpc
# Registry
protoc --proto_path=.:$GOPATH/src --hb-grpc_out=plugins=registry:. proto/service.proto

# 自定义后缀名,默认.pb.grpc.hb.go
protoc --proto_path=.:$GOPATH/src --hb-grpc_out=plugins=registry,suffix=.pb.hb.grpc.go:. proto/service.proto

Documentation

Overview

protoc-gen-hb-grpc is a plugin for the Google protocol buffer compiler to generate Go code. Run it by building this program and putting it in your path with the name

protoc-gen-hb-grpc

That word 'hb-grpc' at the end becomes part of the option string set for the protocol compiler, so once the protocol compiler (protoc) is installed you can run

protoc --hb-grpc_out=plugins=registry:output_directory --go_out=output_directory input_directory/file.proto

to generate hb-grpc code for the protocol defined by file.proto. With that input, the output will be written to

output_directory/file.pb.hb.grpc.go

The generated code is documented in the package comment for the library.

See the README and documentation for protocol buffers to learn more:

https://developers.google.com/protocol-buffers/

Directories

Path Synopsis
The code generator for the plugin for the Google protocol buffer compiler.
The code generator for the plugin for the Google protocol buffer compiler.
internal/remap
Package remap handles tracking the locations of Go tokens in a source text across a rewrite by the Go formatter.
Package remap handles tracking the locations of Go tokens in a source text across a rewrite by the Go formatter.
plugin

Jump to

Keyboard shortcuts

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