SylviaBABY commented on code in PR #7871: URL: https://github.com/apache/apisix/pull/7871#discussion_r965551538
########## docs/zh/latest/apisix-variable.md: ########## @@ -0,0 +1,51 @@ +--- +title: APISIX 变量 +keywords: + - Apache APISIX + - API 网关 + - APISIX variable +description: 本文介绍了 Apache APISIX 支持的变量。 +--- + +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +## 描述 + +APISIX 除了支持 [NGINX 变量](http://nginx.org/en/docs/varindex.html),自身也提供了一些变量。 Review Comment: ```suggestion APISIX 除了支持 [NGINX 变量](http://nginx.org/en/docs/varindex.html)外,自身也提供了一些变量。 ``` ########## docs/zh/latest/apisix-variable.md: ########## @@ -0,0 +1,51 @@ +--- +title: APISIX 变量 +keywords: + - Apache APISIX + - API 网关 + - APISIX variable +description: 本文介绍了 Apache APISIX 支持的变量。 +--- + +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +## 描述 + +APISIX 除了支持 [NGINX 变量](http://nginx.org/en/docs/varindex.html),自身也提供了一些变量。 + +## 变量列表 + +| 变量名称 | 来源 | 描述 | 示例 | +|---------------------|----------- |--------------------------------------------------------------------------------- | ---------------- | +| balancer_ip | core | 上游服务器的 IP 地址。 | 192.168.1.2 | +| balancer_port | core | 上游服务器的端口。 | 80 | +| consumer_name | core | 消费者的名称。 | | +| graphql_name | core | GraphQL 的 [operation name](https://graphql.org/learn/queries/#operation-name)。 | HeroComparison | +| graphql_operation | core | GraphQL 的操作类型。 | mutation | +| graphql_root_fields | core | GraphQL 最高级别的字段。 | ["hero"] | +| mqtt_client_id | mqtt-proxy | MQTT 协议中的客户端 ID。 | | +| route_id | core | APISIX 路由的 ID。 | | +| route_name | core | APISIX 路由的名称。 | | +| service_id | core | APISIX 服务的 ID。 | | +| service_name | core | APISIX 服务的名称。 | | +| redis_cmd_line | Redis | Redis 命令的内容。 | | +| rpc_time | xRPC | 在 RPC 请求级别所花费的时间。 | | + +你也可以创建你自己的[变量](./plugin-develop.md#register-custom-variable)。 Review Comment: ```suggestion 当然,除上述变量外,你也可以创建自定义[变量](./plugin-develop.md#register-custom-variable)。 ``` ########## docs/en/latest/apisix-variable.md: ########## @@ -1,5 +1,10 @@ --- title: APISIX variable +keywords: + - Apache APISIX + - API Gateway + - APISIX variable +description: This is article descriptions Apache APISIX variable. Review Comment: ```suggestion description: This article describes the variables supported by Apache APISIX. ``` ########## docs/en/latest/apisix-variable.md: ########## @@ -21,25 +26,27 @@ title: APISIX variable # --> +## Description + Besides [Nginx variable](http://nginx.org/en/docs/varindex.html), APISIX also provides Review Comment: ```suggestion Besides [NGINX variable](http://nginx.org/en/docs/varindex.html), APISIX also provides ``` ########## docs/en/latest/apisix-variable.md: ########## @@ -21,25 +26,27 @@ title: APISIX variable # --> +## Description + Besides [Nginx variable](http://nginx.org/en/docs/varindex.html), APISIX also provides additional variables. -List in alphabetical order: +## List of variables -| Variable Name | Origin | Description | Example | -|------------------|---------|--------------------| --------- | -| balancer_ip | core | the IP of picked upstream server | 1.1.1.1 | -| balancer_port | core | the port of picked upstream server | 80 | -| consumer_name | core | username of `consumer` | | -| graphql_name | core | the [operation name](https://graphql.org/learn/queries/#operation-name) of GraphQL | HeroComparison | -| graphql_operation | core | the operation type of GraphQL | mutation | -| graphql_root_fields | core | the top level fields of GraphQL | ["hero"] | -| mqtt_client_id | mqtt-proxy | the client id in MQTT protocol | | -| route_id | core | id of `route` | | -| route_name | core | name of `route` | | -| service_id | core | id of `service` | | -| service_name | core | name of `service` | | -| redis_cmd_line | Redis | the content of Redis command | | -| rpc_time | xRPC | time spent at the rpc request level | | +| Variable Name | Origin | Description | Example | +|-------------------- | ---------- | ----------------------------------------------------------------------------------- | ------------- | +| balancer_ip | core | the IP of picked upstream server. | 192.168.1.2 | +| balancer_port | core | the port of picked upstream server. | 80 | +| consumer_name | core | username of Consumer. | | +| graphql_name | core | the [operation name](https://graphql.org/learn/queries/#operation-name) of GraphQL. | HeroComparison | +| graphql_operation | core | the operation type of GraphQL. | mutation | +| graphql_root_fields | core | the top level fields of GraphQL. | ["hero"] | +| mqtt_client_id | mqtt-proxy | the client id in MQTT protocol. | | +| route_id | core | id of Route. | | +| route_name | core | name of Route. | | +| service_id | core | id of Service. | | +| service_name | core | name of Service. | | +| redis_cmd_line | Redis | the content of Redis command. | | +| rpc_time | xRPC | time spent at the rpc request level. | | Review Comment: These descriptions need to use capital letters at the beginning. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
