You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by GitBox <gi...@apache.org> on 2019/10/29 06:37:42 UTC

[GitHub] [incubator-apisix] nic-chen commented on a change in pull request #691: feat grpc proxy doc && test case

nic-chen commented on a change in pull request #691: feat grpc proxy doc && test case
URL: https://github.com/apache/incubator-apisix/pull/691#discussion_r339911227
 
 

 ##########
 File path: doc/grpc-proxy-cn.md
 ##########
 @@ -0,0 +1,53 @@
+[English](grpc-proxy.md)
+# grpc-proxy
+
+通过APISIX代理gRPC连接,并使用APISIX的大部分特性管理你的grpc服务。 
+
+
+
+### 参数
+
+* `service_protocol": "`:  这个 route 的属性`service_protocal` 必须设置为 `grpc`
+* `uri`:   格式为 /service/method 如:/helloworld.Greeter/SayHello
+
+
+
+### 示例
+
+#### 创建代理grpc的route 
+
+在指定 route 中,代理 gRPC 服务接口:
+
+* 注意: 这个 route 的属性`service_protocal` 必须设置为 `grpc`
+* 注意: APISIX 使用TLS加密的HTTP/2暴露gRPC服务, 所以需要先[配置SSL证书](https://github.com/iresty/apisix/blob/master/doc/https-cn.md)
+* 例子所代理的 gRPC 服务可参考:[grpc_server_example](https://github.com/nic-chen/grpc_server_example)
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -X PUT -d '
+{
+    "methods": ["POST", "GET"],
 
 Review comment:
   > for a mini test case, we can remove `"methods": ["POST", "GET"],` this line
   
   can't remove..

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services