-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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-gateway: Mr. Qiang, there is one less grpc gateway for microservices #3741
Comments
DescriptionDoes the goframe framework plan to build a grpc gateway in the future? If there is no gateway and microservices are built, the following sub-modules must be written to receive http and grpc requests at the same time, which is a bit troublesome. A gRPC gateway is an HTTP server that converts RESTful APIs into gRPC requests and then converts gRPC responses into RESTful APIs. The general process is as follows: AdditionalNo response |
同一个 HTTP 请求可能需要若干个 gRPC 拼接起来,HTTP 网关不属于框架的职责范畴 |
The same HTTP request may require several gRPCs to be spliced together. HTTP gateways are not within the scope of the framework's responsibilities. |
@gqcn When the client does not support the gRPC protocol, or when the gRPC service needs to be exposed to a Web application, it is convenient to generate RESTful API conversion functions related to gRPC. Please refer to [go-zore](https://go-zero. dev/docs/tutorials/gateway/grpc) |
除了做http转grpc,还有权限验证,请求拦截... 这些功能 |
In addition to converting http to grpc, there are also permission verification, request interception... these functions |
看这个微服务框架的网关就不错,如果可以集成进来成为一体的话. |
It would be good to look at the gateway of this microservice framework, if it can be integrated into one. |
@wisonlau @oldme-git 你好,由于 |
@wisonlau @oldme-git Hello, since there are many ready-made open source gateways related to |
Description
goframe框架后续有打算搞个grpc网关么,如果没有网关的后,搞微服务,下面的子模块要同时写接收http和grpc请求,有点麻烦.
gRPC 网关是一个 HTTP 服务器,它将 RESTful API 转换为 gRPC 请求,然后将 gRPC 响应转换为 RESTful API。大致流程如下:
从 proto 文件中解析出 gRPC 服务的定义。
从 配置文件中解析出 gRPC 服务的 HTTP 映射规则。
根据 gRPC 服务的定义和 HTTP 映射规则,生成 gRPC 服务的 HTTP 处理器。
启动 HTTP 服务器,处理 HTTP 请求。
将 HTTP 请求转换为 gRPC 请求。
将 gRPC 响应转换为 HTTP 响应。
返回 HTTP 响应。
Additional
No response
The text was updated successfully, but these errors were encountered: