几种gRPC调试工具
完整代码:github.com/cuishuang/grpcdemo, 此处仅需要使用gRPC Server,不需要Client部分
切到 helloservice目录执行 go run main/main.go
grpcui
go install github.com/fullstorydev/grpcui/cmd/grpcui@latest
grpcui -plaintext 127.0.0.1:1234
参考调试工具_微服务实战之 Go gRPC 调试工具,在源码中加一行reflection.Register(s)
重新启动Server
grpcurl
grpcui底层其实就是grpcurl
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
或brew install grpcurl
或使用Docker
1 | # Download image |
grpcurl -plaintext localhost:端口号 list
不如grpcui直观
Postman
另外类似的工具还有 Evans,BloomRPC (超实用的 gRPC 客户端调试工具)
原文作者: fliter
原文链接:
https://dashen.tech/2023/02/19/几种gRPC调试工具/版权声明: 转载请注明出处