grpc
Contents
python grpc
grpcio==1.48.2
grpc 会忽略 linux 环境变量 里配置的 no_proxy, 导致请求失败, 在启动客户端之前 临时删除环境变量 unset HTTP_PROXY
golang grpc
gRPC 通过 HTTP2 协议传输
- 定义协议 protobuf
|
|
- 生成 python 文件
|
|
golang grpc
install protocol compiler plugins
在 https://pkg.go.dev/google.golang.org/protobuf/cmd/protoc-gen-go 可以看到最新的版本号
|
|
|
|
grpc-dump
|
|
wireshark grpc
https://mp.weixin.qq.com/s/BdcFRO58ytrtcpYZVT1ymQ
Wireshark>Edit->Preference->Protocols->Protobuf
analyze
Analyze>Decode As 在current列选择http2
streaming
gRPC 的流式,分为三种类型:
Server-side streaming RPC:服务器端流式 RPC
Client-side streaming RPC:客户端流式 RPC
Bidirectional streaming RPC:双向流式 RPC
https://colobu.com/2017/04/06/dive-into-gRPC-streaming/
https://segmentfault.com/a/1190000016503114
https://github.com/bradleyjkemp/grpc-tools
https://grpc.io/docs/quickstart/go.html#prerequisites
http://www.blogjava.net/killme2008/archive/2010/01/20/310206.html
gRPC over HTTP2
https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
Author -
LastMod 2017-09-07