You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2019/11/13 14:21:15 UTC

[GitHub] [incubator-apisix] membphis commented on a change in pull request #846: grpc-transcode 插件的配置中增加proto option 选项开关.

membphis commented on a change in pull request #846: grpc-transcode 插件的配置中增加proto option 选项开关.
URL: https://github.com/apache/incubator-apisix/pull/846#discussion_r345784452
 
 

 ##########
 File path: doc/plugins/grpc-transcoding-cn.md
 ##########
 @@ -107,3 +107,72 @@ Proxy-Connection: keep-alive
 
 这表示已成功代理。
 
+
+#### 使用 grpc-transcode 插件的 option 选项
+
+在指定 route 中,代理 grpc 服务接口:
+
+**选项清单**
+ * 枚举类型
+    > enum_as_name
+    > enum_as_value
+
+ * 64位整型
+    > int64_as_number
+    > int64_as_string
+    > int64_as_hexstring
+
+ * 使用默认值
+    > auto_default_values
+    > no_default_values
+    > use_default_values
+    > use_default_metatable
+
+  * Hooks开关
+    > enable_hooks
+    > disable_hooks
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/23 -X PUT -d '
+{
+    "methods": ["GET"],
+    "uri": "/zeebe/WorkflowInstanceCreate",
+    "service_protocol": "grpc",
+    "plugins": {
+        "grpc-transcode": {
+         "proto_id": "1",
+         "service": "gateway_protocol.Gateway",
+         "method": "CreateWorkflowInstance",
+         "option":["int64_as_string"]
 
 Review comment:
   Missing schema to check it.

----------------------------------------------------------------
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