https://github.com/devignesh/go-grpc
Goalng gRPC practise
https://github.com/devignesh/go-grpc
Last synced: 12 months ago
JSON representation
Goalng gRPC practise
- Host: GitHub
- URL: https://github.com/devignesh/go-grpc
- Owner: devignesh
- Created: 2020-12-17T18:01:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-07T04:36:41.000Z (about 5 years ago)
- Last Synced: 2023-03-08T12:44:08.024Z (about 3 years ago)
- Language: Go
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-gRPC
Goalng gRPC practise examples.
# gRPC
In gRPC, a client application can directly call a method on a server application on a different machine as if it were a local object, making it easier for you to create distributed applications and services. As in many RPC systems, gRPC is based around the idea of defining a service, specifying the methods that can be called remotely with their parameters and return types. On the server side, the server implements this interface and runs a gRPC server to handle client calls. On the client side, the client has a stub (referred to as just a client in some languages) that provides the same methods as the server.
# service method:
Unary RPCs :
rpc SayHello(HelloRequest) returns (HelloResponse);
Server streaming RPCs:
rpc LotsOfReplies(HelloRequest) returns (stream HelloResponse);
Client streaming RPCs:
rpc LotsOfGreetings(stream HelloRequest) returns (HelloResponse);
Bidirectional streaming RPCs:
rpc BidiHello(stream HelloRequest) returns (stream HelloResponse);