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 2021/09/09 03:01:26 UTC

[GitHub] [apisix] RedemptionC opened a new pull request #5019: docs: add Chinese version of control-api.md

RedemptionC opened a new pull request #5019:
URL: https://github.com/apache/apisix/pull/5019


   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   this PR adds a Chinese version of control-API.md
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [x] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r706834010



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅[插件开发文档](plugin-develop.md)。
+
+## 独立于插件的 control API
+
+以下是支持的 API:
+
+### GET /v1/schema
+
+引入自 2.2 版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+只有启用了的插件才会被包含在返回结果中 `plugins` 部分。(返回结果中的)一些插件可能会缺失如 `consumer_schema` 或者 `type` 字段,这取决于插件的定义。
+
+### GET /v1/healthcheck
+
+引入自 2.3 版本
+
+使用以下格式返回当前的 [health check](health-check.md) 状态:
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个 entry 包含以下字段:
+
+* src_type:表示 health checker 的来源。值是 `routes,services,upstreams` 其中之一

Review comment:
       >where the health checker comes from. The value is one of `["routes", "services", "upstreams"]`.
   
   
   @spacewander 
   what's different?




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r705485119



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。

Review comment:
       @starsz 
   do you mean that we need to change the url in plugin-develop.md for control-api.md to this Chinese version?




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r705281799



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)

Review comment:
       ```suggestion
   注意: control API server 不应该被配置成监听公共流量(public traffic)。
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本

Review comment:
       ```suggestion
   引入自 2.2 版本
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义
+
+### GET /v1/healthcheck
+
+引入自2.3版本
+
+使用以下格式返回当前的[health check](health-check.md)状态

Review comment:
       ```suggestion
   使用以下格式返回当前的 [health check](health-check.md) 状态
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义
+
+### GET /v1/healthcheck
+
+引入自2.3版本
+
+使用以下格式返回当前的[health check](health-check.md)状态
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个entry包含以下字段:
+
+* src_type:表示 health checker 的来源。值是`routes,services,upstreams`其中之一
+* src_id:表示创建health checker的对象的id。例如,假设id为1的Upstream对象创建了一个health checker,那么`src_type`就是`upstreams`,`src_id`就是1
+* name: 表示 health checker 的名称
+* nodes: health checker 的目标节点
+* healthy_nodes: 表示 health checker 检测到的健康节点
+
+用户也可以通过`/v1/healthcheck/$src_type/$src_id`来获取指定 health checker 的状态
+
+例如,`GET /v1/healthcheck/upstreams/1`返回:
+
+```json
+{
+    "healthy_nodes": [
+        {
+            "host": "127.0.0.1",
+            "port": 1980,
+            "priority": 0,
+            "weight": 1
+        }
+    ],
+    "name": "upstream#/upstreams/1",
+    "nodes": [
+        {
+            "host": "127.0.0.1",
+            "port": 1980,
+            "priority": 0,
+            "weight": 1
+        },
+        {
+            "host": "127.0.0.2",
+            "port": 1988,
+            "priority": 0,
+            "weight": 1
+        }
+    ],
+    "src_id": "1",
+    "src_type": "upstreams"
+}
+```
+
+### POST /v1/gc
+
+引入自2.8版本

Review comment:
       ```suggestion
   引入自 2.8 版本
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义
+
+### GET /v1/healthcheck
+
+引入自2.3版本
+
+使用以下格式返回当前的[health check](health-check.md)状态
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个entry包含以下字段:
+
+* src_type:表示 health checker 的来源。值是`routes,services,upstreams`其中之一

Review comment:
       ```suggestion
   * src_type:表示 health checker 的来源。值是 `routes,services,upstreams`其中之一
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义
+
+### GET /v1/healthcheck
+
+引入自2.3版本
+
+使用以下格式返回当前的[health check](health-check.md)状态
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个entry包含以下字段:
+
+* src_type:表示 health checker 的来源。值是`routes,services,upstreams`其中之一
+* src_id:表示创建health checker的对象的id。例如,假设id为1的Upstream对象创建了一个health checker,那么`src_type`就是`upstreams`,`src_id`就是1

Review comment:
       ```suggestion
   * src_id:表示创建 health checker 的对象的id。例如,假设 id 为 1 的 Upstream对 象创建了一个 health checker,那么 `src_type` 就是 `upstreams`,`src_id` 就是 1
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义
+
+### GET /v1/healthcheck
+
+引入自2.3版本
+
+使用以下格式返回当前的[health check](health-check.md)状态
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个entry包含以下字段:
+
+* src_type:表示 health checker 的来源。值是`routes,services,upstreams`其中之一
+* src_id:表示创建health checker的对象的id。例如,假设id为1的Upstream对象创建了一个health checker,那么`src_type`就是`upstreams`,`src_id`就是1
+* name: 表示 health checker 的名称
+* nodes: health checker 的目标节点
+* healthy_nodes: 表示 health checker 检测到的健康节点
+
+用户也可以通过`/v1/healthcheck/$src_type/$src_id`来获取指定 health checker 的状态
+
+例如,`GET /v1/healthcheck/upstreams/1`返回:
+
+```json
+{
+    "healthy_nodes": [
+        {
+            "host": "127.0.0.1",
+            "port": 1980,
+            "priority": 0,
+            "weight": 1
+        }
+    ],
+    "name": "upstream#/upstreams/1",
+    "nodes": [
+        {
+            "host": "127.0.0.1",
+            "port": 1980,
+            "priority": 0,
+            "weight": 1
+        },
+        {
+            "host": "127.0.0.2",
+            "port": 1988,
+            "priority": 0,
+            "weight": 1
+        }
+    ],
+    "src_id": "1",
+    "src_type": "upstreams"
+}
+```
+
+### POST /v1/gc
+
+引入自2.8版本
+
+在 http 子系统中触发一次完整的GC
+
+注意,当你启用 stream proxy 时,APISIX 将为 stream 子系统运行另一个 Lua 虚拟机。不会触发这个Lua虚拟机中的完整 GC

Review comment:
       ```suggestion
   注意,当你启用 stream proxy 时,APISIX 将为 stream 子系统运行另一个 Lua 虚拟机。不会触发这个 Lua 虚拟机中的全量 GC。
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义
+
+### GET /v1/healthcheck
+
+引入自2.3版本

Review comment:
       ```suggestion
   引入自 2.3 版本
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:

Review comment:
       ```suggestion
   默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义

Review comment:
       ```suggestion
   只有启用了的插件才会被包含在返回结果中 `plugins` 部分。(返回结果中的)一些插件可能会缺失如 `consumer_schema` 或者 `type` 字段,这取决于插件的定义
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义
+
+### GET /v1/healthcheck
+
+引入自2.3版本
+
+使用以下格式返回当前的[health check](health-check.md)状态
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个entry包含以下字段:
+
+* src_type:表示 health checker 的来源。值是`routes,services,upstreams`其中之一
+* src_id:表示创建health checker的对象的id。例如,假设id为1的Upstream对象创建了一个health checker,那么`src_type`就是`upstreams`,`src_id`就是1
+* name: 表示 health checker 的名称
+* nodes: health checker 的目标节点
+* healthy_nodes: 表示 health checker 检测到的健康节点
+
+用户也可以通过`/v1/healthcheck/$src_type/$src_id`来获取指定 health checker 的状态
+
+例如,`GET /v1/healthcheck/upstreams/1`返回:
+
+```json
+{
+    "healthy_nodes": [
+        {
+            "host": "127.0.0.1",
+            "port": 1980,
+            "priority": 0,
+            "weight": 1
+        }
+    ],
+    "name": "upstream#/upstreams/1",
+    "nodes": [
+        {
+            "host": "127.0.0.1",
+            "port": 1980,
+            "priority": 0,
+            "weight": 1
+        },
+        {
+            "host": "127.0.0.2",
+            "port": 1988,
+            "priority": 0,
+            "weight": 1
+        }
+    ],
+    "src_id": "1",
+    "src_type": "upstreams"
+}
+```
+
+### POST /v1/gc
+
+引入自2.8版本
+
+在 http 子系统中触发一次完整的GC

Review comment:
       ```suggestion
   在 http 子系统中触发一次完整的 GC
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义
+
+### GET /v1/healthcheck
+
+引入自2.3版本
+
+使用以下格式返回当前的[health check](health-check.md)状态
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个entry包含以下字段:
+
+* src_type:表示 health checker 的来源。值是`routes,services,upstreams`其中之一
+* src_id:表示创建health checker的对象的id。例如,假设id为1的Upstream对象创建了一个health checker,那么`src_type`就是`upstreams`,`src_id`就是1
+* name: 表示 health checker 的名称
+* nodes: health checker 的目标节点
+* healthy_nodes: 表示 health checker 检测到的健康节点
+
+用户也可以通过`/v1/healthcheck/$src_type/$src_id`来获取指定 health checker 的状态
+
+例如,`GET /v1/healthcheck/upstreams/1`返回:

Review comment:
       ```suggestion
   例如,`GET /v1/healthcheck/upstreams/1` 返回:
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听`127.0.0.1:9090`。你可以通过修改`apisix/conf/config.yaml`中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的API:
+
+### GET /v1/schema
+
+引入自2.2版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+返回结果中`plugins`部分,只有启用了的插件才会被包含在内。(返回结果中的)一些插件可能会缺失如`consumer_schema`或者`type`字段,这取决于插件的定义
+
+### GET /v1/healthcheck
+
+引入自2.3版本
+
+使用以下格式返回当前的[health check](health-check.md)状态
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个entry包含以下字段:
+
+* src_type:表示 health checker 的来源。值是`routes,services,upstreams`其中之一
+* src_id:表示创建health checker的对象的id。例如,假设id为1的Upstream对象创建了一个health checker,那么`src_type`就是`upstreams`,`src_id`就是1
+* name: 表示 health checker 的名称
+* nodes: health checker 的目标节点
+* healthy_nodes: 表示 health checker 检测到的健康节点
+
+用户也可以通过`/v1/healthcheck/$src_type/$src_id`来获取指定 health checker 的状态

Review comment:
       ```suggestion
   用户也可以通过 `/v1/healthcheck/$src_type/$src_id` 来获取指定 health checker 的状态。
   ```




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC commented on pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC commented on pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#issuecomment-917025338


   @starsz 
   hello,I have made other Chinese doc refer to this version rather the English version
   you could have a check 


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r706975256



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅[插件开发文档](plugin-develop.md)。
+
+## 独立于插件的 control API
+
+以下是支持的 API:
+
+### GET /v1/schema
+
+引入自 2.2 版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+只有启用了的插件才会被包含在返回结果中 `plugins` 部分。(返回结果中的)一些插件可能会缺失如 `consumer_schema` 或者 `type` 字段,这取决于插件的定义。
+
+### GET /v1/healthcheck
+
+引入自 2.3 版本
+
+使用以下格式返回当前的 [health check](health-check.md) 状态:
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个 entry 包含以下字段:
+
+* src_type:表示 health checker 的来源。值是 `routes,services,upstreams` 其中之一

Review comment:
       The code is `["routes", "services", "upstreams"]` in En version, but it is `routes,services,upstreams` in Ch version.




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #5019:
URL: https://github.com/apache/apisix/pull/5019


   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC edited a comment on pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC edited a comment on pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#issuecomment-915722678


   @tzssangglass @tokers 
   Hello,I have submitted a version of translation,you could have a check
   Also,I don't know what this sentence mean
   `If a plugin adds such a control API, please refer to each plugin's documentation for those APIs.`
   could you provide some explanations?


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] starsz commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
starsz commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r705446563



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。

Review comment:
       Maybe we can refer to this doc about the `插件文档`.
   
   https://github.com/apache/apisix/blob/master/docs/zh/latest/plugin-develop.md#%E6%B3%A8%E5%86%8C%E6%8E%A7%E5%88%B6%E6%8E%A5%E5%8F%A3




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r705913552



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。
+
+## 独立于插件的 control API
+
+以下是支持的 API:
+
+### GET /v1/schema
+
+引入自 2.2 版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+只有启用了的插件才会被包含在返回结果中 `plugins` 部分。(返回结果中的)一些插件可能会缺失如 `consumer_schema` 或者 `type` 字段,这取决于插件的定义

Review comment:
       ```suggestion
   只有启用了的插件才会被包含在返回结果中 `plugins` 部分。(返回结果中的)一些插件可能会缺失如 `consumer_schema` 或者 `type` 字段,这取决于插件的定义。
   ```




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] starsz commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
starsz commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r706062428



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅对应插件的文档。

Review comment:
       Yes. We need.
   
   Another thing, we can add the `plugin-develop.md` link 
   ```
   插件被启用时可以添加自己的 control API,参考[插件开发文档](plugin-develop.md)
   ```




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC edited a comment on pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC edited a comment on pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#issuecomment-915722678


   @tzssangglass @tokers 
   Hello,I have submitted a version of translation,you could have a check
   Also,I don't know what this sentence mean
   `If a plugin adds such a control API, please refer to each plugin's documentation for those APIs.`
   what does `refer to each plugin's documentation for those APIs.` mean?
   could you provide some explanations?


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r706981282



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅[插件开发文档](plugin-develop.md)。
+
+## 独立于插件的 control API
+
+以下是支持的 API:
+
+### GET /v1/schema
+
+引入自 2.2 版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+只有启用了的插件才会被包含在返回结果中 `plugins` 部分。(返回结果中的)一些插件可能会缺失如 `consumer_schema` 或者 `type` 字段,这取决于插件的定义。
+
+### GET /v1/healthcheck
+
+引入自 2.3 版本
+
+使用以下格式返回当前的 [health check](health-check.md) 状态:
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个 entry 包含以下字段:
+
+* src_type:表示 health checker 的来源。值是 `routes,services,upstreams` 其中之一

Review comment:
       @spacewander 
   that's right,but I don't see what `[]` is needed
   Of course I can add it to keep consistent with English version




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r706834010



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅[插件开发文档](plugin-develop.md)。
+
+## 独立于插件的 control API
+
+以下是支持的 API:
+
+### GET /v1/schema
+
+引入自 2.2 版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+只有启用了的插件才会被包含在返回结果中 `plugins` 部分。(返回结果中的)一些插件可能会缺失如 `consumer_schema` 或者 `type` 字段,这取决于插件的定义。
+
+### GET /v1/healthcheck
+
+引入自 2.3 版本
+
+使用以下格式返回当前的 [health check](health-check.md) 状态:
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个 entry 包含以下字段:
+
+* src_type:表示 health checker 的来源。值是 `routes,services,upstreams` 其中之一

Review comment:
       >where the health checker comes from. The value is one of `["routes", "services", "upstreams"]`.
   @spacewander 
   what's different?




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC commented on pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC commented on pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#issuecomment-915722678


   @tzssangglass @tokers 
   Hello,I have submitted a version of translation,you could have a check
   Also,I don't know that this sentence mean
   `If a plugin adds such a control API, please refer to each plugin's documentation for those APIs.`
   could you provide some explanations?


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r704942305



##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露APISIX内部状态信息
+* 控制单个APISIX的数据平面的行为

Review comment:
       ```suggestion
   * 暴露 APISIX 内部状态信息
   * 控制单个 APISIX 的数据平面的行为
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露APISIX内部状态信息
+* 控制单个APISIX的数据平面的行为
+
+默认情况下,control API是启用的,监听`127.0.0.1:9090`.你可以通过修改`apisix/conf/config.yaml`中的control部分来更改设置,如下:

Review comment:
       ```suggestion
   默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的control 部分来更改设置,如下:
   ```
   
   And please fix other similar errors.
   
   - Chinese should be preceded by spaces between English, numbers and other special symbols.
   - Use Chinese punctuation.




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC commented on pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC commented on pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#issuecomment-915739673


   @tzssangglass @tokers
   thanks to @spacewander , I have completed this vesion of translation
   you could check again


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#discussion_r706829976



##########
File path: docs/zh/latest/plugin-develop.md
##########
@@ -378,7 +378,7 @@ end
 
 ### 注册控制接口
 
-如果你只想暴露 API 到 localhost 或内网,你可以通过 [Control API](../../en/latest/control-api.md) 来暴露它。
+如果你只想暴露 API 到 localhost 或内网,你可以通过 [Control API](../../zh/latest/control-api.md) 来暴露它。

Review comment:
       We don't need to go back to the grandparent directory and then go to his children. Just do what the English version does.

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅[插件开发文档](plugin-develop.md)。

Review comment:
       The translation is incorrect. It is quite different from the English version

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅[插件开发文档](plugin-develop.md)。
+
+## 独立于插件的 control API
+
+以下是支持的 API:
+
+### GET /v1/schema
+
+引入自 2.2 版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+只有启用了的插件才会被包含在返回结果中 `plugins` 部分。(返回结果中的)一些插件可能会缺失如 `consumer_schema` 或者 `type` 字段,这取决于插件的定义。
+
+### GET /v1/healthcheck
+
+引入自 2.3 版本
+
+使用以下格式返回当前的 [health check](health-check.md) 状态:
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个 entry 包含以下字段:
+
+* src_type:表示 health checker 的来源。值是 `routes,services,upstreams` 其中之一

Review comment:
       The translation is different from the English version?

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。

Review comment:
       ```suggestion
   注意: control API server 不应该被配置成监听公网地址。
   ```

##########
File path: docs/zh/latest/control-api.md
##########
@@ -0,0 +1,202 @@
+---
+title: Control API
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+control API 可以被用来:
+
+* 暴露 APISIX 内部状态信息
+* 控制单个 APISIX 的数据平面的行为
+
+默认情况下,control API 是启用的,监听 `127.0.0.1:9090`。你可以通过修改 `apisix/conf/config.yaml` 中的 control 部分来更改设置,如下:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+注意: control API server 不应该被配置成监听公共流量(public traffic)。
+
+## 通过插件添加的 control API
+
+插件被启用时可以添加自己的 control API。如果你对他们感兴趣,请参阅[插件开发文档](plugin-develop.md)。
+
+## 独立于插件的 control API
+
+以下是支持的 API:
+
+### GET /v1/schema
+
+引入自 2.2 版本
+
+使用以下格式返回被该 APISIX 实例使用的 json schema:
+
+```json
+{
+    "main": {
+        "route": {
+            "properties": {...}
+        },
+        "upstream": {
+            "properties": {...}
+        },
+        ...
+    },
+    "plugins": {
+        "example-plugin": {
+            "consumer_schema": {...},
+            "metadata_schema": {...},
+            "schema": {...},
+            "type": ...,
+            "priority": 0,
+            "version": 0.1
+        },
+        ...
+    },
+    "stream-plugins": {
+        "mqtt-proxy": {
+            ...
+        },
+        ...
+    }
+}
+```
+
+只有启用了的插件才会被包含在返回结果中 `plugins` 部分。(返回结果中的)一些插件可能会缺失如 `consumer_schema` 或者 `type` 字段,这取决于插件的定义。
+
+### GET /v1/healthcheck
+
+引入自 2.3 版本
+
+使用以下格式返回当前的 [health check](health-check.md) 状态:
+
+```json
+[
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/upstreams/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.2",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "upstreams"
+    },
+    {
+        "healthy_nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "name": "upstream#/routes/1",
+        "nodes": [
+            {
+                "host": "127.0.0.1",
+                "port": 1980,
+                "priority": 0,
+                "weight": 1
+            },
+            {
+                "host": "127.0.0.1",
+                "port": 1988,
+                "priority": 0,
+                "weight": 1
+            }
+        ],
+        "src_id": "1",
+        "src_type": "routes"
+    }
+]
+```
+
+每个 entry 包含以下字段:
+
+* src_type:表示 health checker 的来源。值是 `routes,services,upstreams` 其中之一
+* src_id:表示创建 health checker 的对象的id。例如,假设 id 为 1 的 Upstream 对象创建了一个 health checker,那么 `src_type` 就是 `upstreams`,`src_id` 就是 1
+* name: 表示 health checker 的名称
+* nodes: health checker 的目标节点
+* healthy_nodes: 表示 health checker 检测到的健康节点
+
+用户也可以通过 `/v1/healthcheck/$src_type/$src_id` 来获取指定 health checker 的状态。
+
+例如,`GET /v1/healthcheck/upstreams/1` 返回:
+
+```json
+{
+    "healthy_nodes": [
+        {
+            "host": "127.0.0.1",
+            "port": 1980,
+            "priority": 0,
+            "weight": 1
+        }
+    ],
+    "name": "upstream#/upstreams/1",
+    "nodes": [
+        {
+            "host": "127.0.0.1",
+            "port": 1980,
+            "priority": 0,
+            "weight": 1
+        },
+        {
+            "host": "127.0.0.2",
+            "port": 1988,
+            "priority": 0,
+            "weight": 1
+        }
+    ],
+    "src_id": "1",
+    "src_type": "upstreams"
+}
+```
+
+### POST /v1/gc
+
+引入自 2.8 版本
+
+在 http 子系统中触发一次全量 GC
+
+注意,当你启用 stream proxy 时,APISIX 将为 stream 子系统运行另一个 Lua 虚拟机。不会触发这个 Lua 虚拟机中的全量 GC。

Review comment:
       ```suggestion
   注意,当你启用 stream proxy 时,APISIX 将为 stream 子系统运行另一个 Lua 虚拟机。它不会触发这个 Lua 虚拟机中的全量 GC。
   ```




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] RedemptionC commented on pull request #5019: docs: add Chinese version of control-api.md

Posted by GitBox <gi...@apache.org>.
RedemptionC commented on pull request #5019:
URL: https://github.com/apache/apisix/pull/5019#issuecomment-915779009


   @tzssangglass hello,I have commited changes . you can check again


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org