Package list golang-github-go-kit-kit / b74e303
update grpc readme information about protoc and streams David Sudia 4 years ago
1 changed file(s) with 10 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
22 [gRPC]( is an excellent, modern IDL and transport for microservices.
33 If you're starting a greenfield project, Go kit strongly recommends gRPC as your default transport.
4 And using gRPC and Go kit together is very simple.
5 One important note is that while gRPC supports streaming requests and replies, go-kit does not. You can still use streams in your service, but their implementation will not be able to take advantage of many go-kit features like middleware.
7 Using gRPC and Go kit together is very simple.
69 First, define your service using protobuf3.
710 This is explained [in gRPC documentation](
912 Make sure the proto definition matches your service's Go kit (interface) definition.
1114 Next, get the protoc compiler.
12 Unfortunately, this needs to be done from source.
13 Fortunately, it's pretty straightforward.
15 ```
16 You can download pre-compiled binaries from the [protobuf release page]( You will unzip a folder called `protoc3` with a subdirectory `bin` containing an executable. Move that executable somewhere in your `$PATH` and you're good to go!
18 It can also be built from source.
20 ```sh
1621 brew install autoconf automake libtool
1722 git clone
1823 cd protobuf
2227 Then, compile your service definition, from .proto to .go.
24 ```
29 ```sh
2530 protoc add.proto --go_out=plugins=grpc:.
2631 ```