This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new d4d99e794 docs: add discovery endpoints to control api doc (#11507)
d4d99e794 is described below

commit d4d99e794673c08dd69f20e70eb21672969732ff
Author: Traky Deng <trakyd...@gmail.com>
AuthorDate: Sun Jan 5 20:28:54 2025 +0800

    docs: add discovery endpoints to control api doc (#11507)
    
    ]
---
 docs/en/latest/control-api.md | 68 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/docs/en/latest/control-api.md b/docs/en/latest/control-api.md
index 8bd147869..4a5e6e9a5 100644
--- a/docs/en/latest/control-api.md
+++ b/docs/en/latest/control-api.md
@@ -485,3 +485,71 @@ Triggers a hot reload of the plugins.
 ```shell
 curl "http://127.0.0.1:9090/v1/plugins/reload"; -X PUT
 ```
+
+### GET /v1/discovery/{service}/dump
+
+Get memory dump of discovered service endpoints and configuration details:
+
+```json
+{
+  "endpoints": [
+    {
+      "endpoints": [
+        {
+          "value": 
"{\"https\":[{\"host\":\"172.18.164.170\",\"port\":6443,\"weight\":50},{\"host\":\"172.18.164.171\",\"port\":6443,\"weight\":50},{\"host\":\"172.18.164.172\",\"port\":6443,\"weight\":50}]}",
+          "name": "default/kubernetes"
+        },
+        {
+          "value": 
"{\"metrics\":[{\"host\":\"172.18.164.170\",\"port\":2379,\"weight\":50},{\"host\":\"172.18.164.171\",\"port\":2379,\"weight\":50},{\"host\":\"172.18.164.172\",\"port\":2379,\"weight\":50}]}",
+          "name": "kube-system/etcd"
+        },
+        {
+          "value": 
"{\"http-85\":[{\"host\":\"172.64.89.2\",\"port\":85,\"weight\":50}]}",
+          "name": "test-ws/testing"
+        }
+      ],
+      "id": "first"
+    }
+  ],
+  "config": [
+    {
+      "default_weight": 50,
+      "id": "first",
+      "client": {
+        "token": "xxx"
+      },
+      "service": {
+        "host": "172.18.164.170",
+        "port": "6443",
+        "schema": "https"
+      },
+      "shared_size": "1m"
+    }
+  ]
+}
+```
+
+## GET /v1/discovery/{service}/show_dump_file
+
+Get configured services details.
+
+```json
+{
+  "services": {
+    "service_a": [
+      {
+        "host": "172.19.5.12",
+        "port": 8000,
+        "weight": 120
+      },
+      {
+        "host": "172.19.5.13",
+        "port": 8000,
+        "weight": 120
+      }
+    ]
+  },
+  "expire": 0,
+  "last_update": 1615877468
+}
+```

Reply via email to