-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
后端服务是grpc的,hertz如何结合服务发现和grpc进行调用? #908
Comments
在 hertz 侧添加对应的注册中心服务发现客户端&&编写相应的pb文档并生成代码就可以用了吧 |
有对应的demo吗?我看现在使用注册中心的,都是client.Get或者client.Do这种直接发请求的 |
调用 gprc 看看能不能还是用专业的 grpc client 吧,hertz client 没办法直接调用 grpc ,比如看看 kitex client https://www.cloudwego.io/zh/docs/kitex/tutorials/basic-feature/message_type/ |
期望是能够使用hertz本身的服务发现功能,然后结合grpc去做调用 |
目前没办法直接支持,如果想支持需要 hertz 协议层和传输层适配 grpc。 |
这块hertz有计划后面支持吗? |
目前没人力支持这个feat,可以记到 todo 里 |
讨论了一下&不会支持,暂时关闭了。 grpc 相关可以使用 kitex 。 |
Describe the Question
A clear and concise description of what the question is.
存量后端是用的grpc,如何在hertz中,使用注册中心+grpc进行调用?
Reproducible Code
Please construct a minimum complete and reproducible example for us to get the same error. And tell us how to reproduce it like how you send a request or send what request.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your question.
Hertz version:
Please provide the version of Hertz you are using.
Environment:
The output of
go env
.Additional context
Add any other context about the question here.
The text was updated successfully, but these errors were encountered: