Part of blog: Calling microservice as simple as calling function: gRPC
./gradlew bootRun
# in another window
brew install grpc
# call with curl
grpc_cli call localhost:9090 org.akshit.grpcinterface.hello.HelloService.SayHello 'name: "thalaiva"'
# explore about service
grpc_cli ls localhost:9090
grpc_cli ls localhost:9090 org.akshit.grpcinterface.hello.HelloService --l
grpc_cli ls localhost:9090 org.akshit.grpcinterface.hello.HelloService/SayHello --l
grpc_cli type localhost:9090 org.akshit.grpcinterface.hello.Greeter
# First use local publish instructions in grpc-interface repo. then:
./gradlew build
export CODEARTIFACT_AUTH_TOKEN=`\
aws codeartifact get-authorization-token \
--domain akshit \
--query authorizationToken \
--output text`
./gradlew build
This will use remote grpc-interface
library, published by us
export CODEARTIFACT_AUTH_TOKEN=`\
aws codeartifact get-authorization-token \
--domain akshit \
--query authorizationToken \
--output text`
docker build \
--build-arg CODEARTIFACT_AUTH_TOKEN=${CODEARTIFACT_AUTH_TOKEN} \
-t grpc-server \
.
docker run -d -p 9090:9090 grpc-server