FredSuvn
FredSuvn

Reputation: 2087

how request local gRPC server?

I have a gRPC server, and I want to call this server by local channel like:

other message -> adapter -> local grpc client -> local grpc server

so how to create a local grpc client?, use local channel to build stub?

Upvotes: 1

Views: 4869

Answers (2)

Ivan Li
Ivan Li

Reputation: 241

if you want a cli type of call to your local grpc server, you could checkout https://github.com/fullstorydev/grpcurl

Upvotes: 1

Eric Anderson
Eric Anderson

Reputation: 26474

Two options:

  1. also start your services with the InProcessServerBuilder, and use the InProcessChannelBuilder to communicate with it, or
  2. just contact the server over "localhost"

Upvotes: 3

Related Questions