go-grpc-service

command module
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 9 Imported by: 0

README

go-grpc-service

The gRPC service serves external requests are sharing the Protocol Buffer messages.

📌 Install gRPCurl client and Protobuf compiler before use:

brew install grpcurl
brew install protobuf
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

📌 After compiling of proto files use gRPCurl to test it as:

grpcurl --plaintext localhost:9091 list
grpcurl --plaintext localhost:9091 list grpc_service.Currency
grpcurl --plaintext localhost:9091 describe grpc_service.Currency.MakeExchange
grpcurl --plaintext localhost:9091 describe .grpc_service.ExchangeRequest
grpcurl --plaintext -d '{"From": "EUR", "To": "USD"}' localhost:9091 grpc_service.Currency.MakeExchange
grpcurl --plaintext --msg-template -d @ localhost:9091 describe .grpc_service.ExchangeRequest
grpcurl --plaintext --msg-template -d @ localhost:9091 grpc_service.Currency.Subscriber

💡 Template message (might be inserted into stream as is):

{
  "From": "EUR",
  "To": "USD"
}

🎥 Thanks Nic Jackson for sharing his knowledge.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
proto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL