详解 gRPC 框架的 4 种 API: Unary RPC、Server-side Streaming RPC、Client-side Streaming RPC、Bi-directional Streaming RPC,并演示了 gRPC 的高级特性,比如 Error Handling、Deadlines & Timeouts、Cancelling RPCs、Authentication(SSL/TLS)、Interceptor、Language Interoperability、Reflection & Evans CLI 等。最后,用一个实例 ToDo list 将我们所学的 gRPC 全部知识融会贯通
Clone the code:
[root@CentOS ~]# git clone https://github.com/wangy8961/grpc-go-tutorial.git
Open a new terminal:
[root@CentOS ~]# cd grpc-go-tutorial
[root@CentOS grpc-go-tutorial]# go run greet/greet_server/main.go
Open a new terminal:
[root@CentOS ~]# cd grpc-go-tutorial
[root@CentOS grpc-go-tutorial]# go run greet/greet_client/main.go