Discover Packages
github.com/googx/linuxShell/goTest
t3
p8_grpc
directory
Version:
v0.0.0-...-63b2ac5
Opens a new window with list of versions in this module.
Published: Dec 13, 2019
License: GPL-2.0
Opens a new window with license information.
README
README
¶
说明
教程
Github站点
获取例子
$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_client
$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_server
idea可以用使用插件Protobuf Support
来方便编写protol-buffer文件
安装环境步骤
安装protobuf协议编译器github下载 protoc-3.8.0-linux-x86_64.zip 安装包
安装protobuf-go语言版编译插件 go get -u https://github.com/golang/protobuf.git
如果需要手动安装:
git clone https://github.com/golang/protobuf.git ~/.GO/thirdPkg/src/golang.org/x/ && cd ~/.GO/thirdPkg/src/golang.org/x/protobuf/protoc-gen-go && go build . && go install
使用如下命令生成对应的代码
```
$ protoc --go_out=plugins=grpc:. p1_helloworld/proto/helloworld.proto
```
安装grpc-go 库 go get -u github.com/grpc/grpc-go
手动安装:
cd ~/.GO/thirdPkg/src
mkdir google.golang.org
git clone https://github.com/grpc/grpc-go.git
Expand ▾
Collapse ▴
Directories
¶
Click to show internal directories.
Click to hide internal directories.