警告
本文最后更新于 2020-08-27,文中内容可能已过时。
安装
到项目主页,找到发布地址,然后下载相应操作系统下的可执行文件。
1
2
3
4
5
6
|
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
|
使用
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
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 |
+--------------+
|