Grpc 流式传输Stream Demo

rushui · · 1325 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

## 说明 grpc 流式传输 demo 服务端流、客户端流、双向流 ## 准备工作 ```bash brew install protobuf protoc --version #最新版本 go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest export PATH=$PATH:$GOPATH/bin ``` ## 下载demo ```bash git clone https://github.com/grpc-example/stream.git cd stream go mod tidy ``` ## 编译.proto文件命令 ```bash make api go mod tidy ``` ## run server ```bash go run server.go ``` ## run client ```bash go run client.go ``` ## 项目地址 https://github.com/grpc-example/stream ## 文章引用 https://www.rushui.net/posts/grpc-stream-demo/

有疑问加站长微信联系(非本文作者))

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1325 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传