安装

项目主页,找到发布地址,然后下载相应操作系统下的可执行文件。

cd /tmp
wget https://github.com/ktr0731/evans/releases/download/0.9.0/evans_linux_amd64.tar.gz
tar -xvf evans_linux_amd64.tar.gz

## 复制到系统路径
sudo mv evans /usr/local/bin

使用

evans --host 127.0.0.1 --port 50051 helloworld.proto

  ______
 |  ____|
 | |__    __   __   __ _   _ __    ___
 |  __|   \ \ / /  / _. | | '_ \  / __|
 | |____   \ V /  | (_| | | | | | \__ \
 |______|   \_/    \__,_| |_| |_| |___/

 more expressive universal gRPC client

helloworld.Greeter@127.0.0.1:50051>


helloworld.Greeter@127.0.0.1:50051> show package
+------------+
|  PACKAGE   |
+------------+
| helloworld |
+------------+

helloworld.Greeter@127.0.0.1:50051> package helloworld

helloworld@127.0.0.1:50051> show service
+---------+----------+--------------+---------------+
| SERVICE |   RPC    | REQUEST TYPE | RESPONSE TYPE |
+---------+----------+--------------+---------------+
| Greeter | SayHello | HelloRequest | HelloReply    |
+---------+----------+--------------+---------------+

helloworld@127.0.0.1:50051> show message
+--------------+
|   MESSAGE    |
+--------------+
| HelloReply   |
| HelloRequest |
+--------------+