Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mchmarny/grpctest
Simple test app for GRPC
https://github.com/mchmarny/grpctest
client cloudrun golang grpc protobuf server
Last synced: 16 days ago
JSON representation
Simple test app for GRPC
- Host: GitHub
- URL: https://github.com/mchmarny/grpctest
- Owner: mchmarny
- License: apache-2.0
- Created: 2019-06-24T23:50:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T03:20:55.000Z (almost 2 years ago)
- Last Synced: 2024-11-08T12:38:10.539Z (2 months ago)
- Topics: client, cloudrun, golang, grpc, protobuf, server
- Language: Go
- Homepage:
- Size: 5.69 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grpctest
## generate
### proto
```shell
protoc \
--proto_path=api/v1 \
--proto_path=${GOOGLEAPIS_DIR} \
--go_out=plugins=grpc:pkg/api/v1 \
message.proto
```### gateway
```shell
protoc \
--proto_path=api/v1 \
--proto_path=${GOOGLEAPIS_DIR} \
--grpc-gateway_out=logtostderr=true:pkg/api/v1 \
message.proto
```### docs
```shell
protoc \
--proto_path=api/v1 \
--proto_path=${GOOGLEAPIS_DIR} \
--swagger_out=logtostderr=true:api/swagger/v1 \
message.proto
```## run
### locally
```shell
go run cmd/server/main.go
```### cloud run on gke
```shell
kubectl apply -f deploy/service.yaml -n demo
```## client
### local (grpc)
```shell
go run cmd/client/main.go --server=":8080" --name=John
```### local (rest)
```shell
curl http://localhost:7777/v1/say/mark
```### cloud run on gke
```shell
go run cmd/client/main.go \
--server=grpctest.demo.knative.tech:8080 \
--name=John
```