Categorygithub.com/AFukun/rpc-example
repository
0.0.0-20211219084759-aeae42a10d4c
Repository: https://github.com/afukun/rpc-example.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

Client-Server Example Using gRPC

Build Excutable

$ mkdir -p $GOPATH/src/github.com/AFukun
$ cd $GOPATH/src/github.com/AFukun
$ git clone https://github.com/AFukun/rpc-example.git
$ cd rpc-example
$ go mod tidy
$ make build

Run Example

# Shell 1 
$ ./bin/server 9000
# Shell 2
$ ./bin/server 9001
# Shell 3
$ ./bin/server 9002
# Shell 4
$ ./bin/server 9003

# Shell 0 (client should be running after server initialized)
# 只要有一个server正确运行则可以返回结果
$ ./bin/client