An open API service indexing awesome lists of open source software.

https://github.com/danielvieiravega/go-grpc-example


https://github.com/danielvieiravega/go-grpc-example

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

Exemplo de utilização do gRPC usando go.

O código foi feito acompanhando o curso de Comunicação entre sistemas da plataforma https://fullcycle.com.br/

```sh
sudo apt install protobuf-compiler
go mod init github.com//
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
export PATH="$PATH:$(go env GOPATH)/bin"
source ~/.bashrc
```

--gerar os stubs
```sh
protoc --proto_path=proto/ proto/*.proto --plugin=$(go env GOPATH)/bin/protoc-gen-go-grpc --go-grpc_out=. --go_out=.
```