Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tzolov/poc-go-grpc
https://github.com/tzolov/poc-go-grpc
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tzolov/poc-go-grpc
- Owner: tzolov
- Created: 2021-09-20T21:27:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-21T08:42:30.000Z (about 3 years ago)
- Last Synced: 2024-06-21T01:58:24.822Z (5 months ago)
- Language: Go
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# poc-go-grpc
## protochttps://developers.google.com/protocol-buffers/docs/reference/go-generated#package
https://grpc.io/docs/languages/go/quickstart/
```
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"
``````
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ./protos/MessageService.proto
```form within the `protos` folder:
```
go mod init github.com/tzolov/poc-go-grpc/message
go mod tidy
```https://medium.com/@adiach3nko/package-management-with-go-modules-the-pragmatic-guide-c831b4eaaf31
```
go mod edit -replace tzolov.net/go-grpc/message=./protos/
go get tzolov.net/go-grpc/message
```## Docker Image
```
docker build -t tzolov/poc-go-grpc:0.1 .
docker push tzolov/poc-go-grpc:0.1
``````
docker run -it -p55554:55554 tzolov/poc-go-grpc:0.1
```