grpc是高性能的rpc框架,基于http2协议(双向流、头部压缩、多复用请求等),默认使用protobuf序列化协议 安装123456789# grpc编译器curl -fsSL https://goo.gl/getgrpc | bash -s -- --with-plugins# Golang protobuf插件# 编译后会安装protoc-gen-go到$GOBIN目录, 默认在 $GOPATH/bin. 该目录必须在系统的环境变量$PATH中,这样在编译.proto文件时protocol编译器才能找到插件go get -u github.com/golang/protobuf/{proto,protoc-gen-go}# grpc-gogo get -u google.golang.org/grpc 参考https://segmentfault.com/a/1190000007880647