grpc调试工具grpcui安装使用

简介

grpcui通过web的方式对grpc进行调试,类似于postman对http接口的调试。

安装

官网:https://github.com/fullstorydev/grpcui

go get github.com/fullstorydev/grpcui
go install github.com/fullstorydev/grpcui/cmd/grpcui

苦于没有翻墙,所以没能一步到位,手动下载部分依赖,记录如下:

//安装go环境
yum install go
mkdir gopath
export GOPATH=/home/xiaofeng/gopath/

//go get 安装部分
export GOPROXY=https://mirrors.aliyun.com/goproxy/
go get github.com/golang/protobuf
go get github.com/fullstorydev/grpcui

//git clone安装部分
cd github.com/envoyproxy
git clone https://github.com/envoyproxy/go-control-plane.git

mkdir golang.org/x -p
cd golang.org/x
git clone https://github.com/golang/net.git
git clone https://github.com/golang/text.git
git clone https://github.com/golang/sys.git   
git clone https://github.com/golang/oauth2.git   

mkdir google.golang.org
cd google.golang.org/
git clone https://github.com/protocolbuffers/protobuf-go.git
mv protobuf-go protobuf
git clone https://github.com/googleapis/go-genproto.git
mv go-genproto/ genproto
git clone https://github.com/grpc/grpc-go.git
mv grpc-go/ grpc

mkdir cloud.google.com
cd cloud.google.com/
git clone https://github.com/googleapis/google-cloud-go.git
mv google-cloud-go/ go

使用

//连接本地的50051grpc服务端口,绑定192.168.13.38建立grpcui的访问端口(随机)
#grpcui -bind 192.168.13.38 -plaintext 127.0.0.1:50051
gRPC Web UI available at http://192.168.13.38:38075/

note:注意关闭防火墙
 	systemctl disable firewalld


浏览器访问

http://192.168.13.38:38075/
在这里插入图片描述
在这里插入图片描述

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值