Skip to content

Instantly share code, notes, and snippets.

@qneyrat
Last active April 24, 2018 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qneyrat/05c45fd39b2dd4c2f443250c803fdf26 to your computer and use it in GitHub Desktop.
Save qneyrat/05c45fd39b2dd4c2f443250c803fdf26 to your computer and use it in GitHub Desktop.
Prototool example

install with Go

> $ go get -u github.com/uber/prototool/cmd/prototool

gen command

Simple config file to generate grpc service

prototool.yaml

gen:
  go_options:
    import_path: my-service-path/

  plugins:
    - name: go
      type: go
      flags: plugins=grpc
      output: .
> $ prototool gen

grpc command

Call grpc service

input.json is payload for gprc service

> $ cat input.json | prototool grpc myproto/myservice.proto 0.0.0.0:4000 mypackage.MyService/MyMethod -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment