tokers commented on a change in pull request #3048:
URL: https://github.com/apache/apisix/pull/3048#discussion_r545513373



##########
File path: doc/control-api.md
##########
@@ -0,0 +1,51 @@
+<!--
+#
+# 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.
+#
+-->
+
+The control API can be used to
+* expose APISIX internal state
+* control the behavior of a single isolate APISIX data panel
+
+By default, the control API server is enabled and listens to `127.0.0.1:9090`. 
You can change it via
+the `control` section under `apisix` in `conf/config.yaml`:
+
+```yaml
+apisix:
+  ...
+  enable_control: true
+  control:
+    ip: "127.0.0.1"
+    port: 9090
+```
+
+Note that the control API server should not be configured to listen to the 
public traffic!
+
+## Control API Added via plugin
+
+Plugin can add its control API when it is enabled.

Review comment:
       Shall we add the control API example in plugin-develop.md?

##########
File path: conf/config-default.yaml
##########
@@ -114,6 +114,10 @@ apisix:
     key_encrypt_salt: "edd1c9f0985e76a2"    #  If not set, will save origin 
ssl key into etcd.
                                             #  If set this, must be a string 
of length 16. And it will encrypt ssl key with AES-128-CBC
                                             #  !!! So do not change it after 
saving your ssl, it can't decrypt the ssl keys have be saved if you change !!
+  enable_control: true

Review comment:
       Agree, and we need more comments here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to