An example of gRPC written in many languages
- proto-contract: Contract of grpc-example project written in protobuf
- client-kotlin: An example of client stub implementation of gRPC in kotlin
- server-kotlin: An example of server stub implementation of gRPC in kotlin
Prerequisite:
- JDK 11 or higher
Open terminal and execute command below:
./gradlew clean :proto-contract:build
It will be generated on directory proto-contract/build/generated/source/proto/main
Prerequisite:
- JDK 11 or higher
Open terminal and execute command below:
./gradlew clean :proto-contract:build
It will be generated on directory proto-contract/build/generated/source/proto/main
Prerequisite:
- Ruby
v2.7.*
or higher
Setup dependencies by executing these commands below in terminal:
gem install grpc
gem install grpc-tools
Execute example command below in terminal:
grpc_tools_ruby_protoc -I proto-contract/src/main/proto/aliqornan/grpc/example/protocontract --ruby_out=generated/proto/ruby --grpc_out=generated/proto/ruby proto-contract/src/main/proto/aliqornan/grpc/example/protocontract/country.proto
It will be generated on directory generated/proto/ruby
Prerequisite:
- Go
v1.19.*
or higher
Setup dependencies by executing these commands below in terminal:
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
export PATH="$PATH:$(go env GOPATH)/bin"
Execute example command below in terminal:
protoc --go_out=generated/proto/go --go_opt=paths=source_relative --go-grpc_out=generated/proto/go --go-grpc_opt=paths=source_relative proto-contract/src/main/proto/aliqornan/grpc/example/protocontract/country.proto
It will be generated on directory generated/proto/go