From 56279f63058c843a94e455af12ed42064d7ecab1 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sat, 11 Feb 2023 10:18:07 +0100 Subject: [PATCH] docs: fix bridge status report --- apps/emqx_bridge/i18n/emqx_bridge_schema.conf | 26 ++++++++++++++++--- .../src/schema/emqx_bridge_schema.erl | 2 +- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/apps/emqx_bridge/i18n/emqx_bridge_schema.conf b/apps/emqx_bridge/i18n/emqx_bridge_schema.conf index d575f09bc..901f25455 100644 --- a/apps/emqx_bridge/i18n/emqx_bridge_schema.conf +++ b/apps/emqx_bridge/i18n/emqx_bridge_schema.conf @@ -35,8 +35,18 @@ emqx_bridge_schema { desc_status { desc { - en: """The status of the bridge""" - zh: """Bridge 的状态""" + en: """The status of the bridge
+- connecting: the initial state before any health probes were made.
+- connected: when the bridge passes the health probes.
+- disconnected: when the bridge can not pass health probes.
+- stopped: when the bridge resource is requested to be stopped.
+- inconsistent: When not all the nodes are at the same status.""" + zh: """Bridge 的连接状态
+- connecting: 启动时的初始状态。
+- connected: 桥接驱动健康检查正常。
+- disconnected: 当桥接无法通过健康检查。
+- stopped: 桥接处于停用状态。
+- inconsistent: 集群中有各节点汇报的状态不一致。""" } label: { en: "Bridge Status" @@ -46,8 +56,16 @@ emqx_bridge_schema { desc_node_status { desc { - en: """The status of the bridge for each node""" - zh: """每个节点的 Bridge 状态""" + en: """The status of the bridge for each node. +- connecting: the initial state before any health probes were made.
+- connected: when the bridge passes the health probes.
+- disconnected: when the bridge can not pass health probes.
+- stopped: when the bridge resource is requested to be stopped.""" + zh: """每个节点的 Bridge 状态 +- connecting: 启动时的初始状态。
+- connected: 桥接驱动健康检查正常。
+- disconnected: 当桥接无法通过健康检查。
+- stopped: 桥接处于停用状态。""" } label: { en: "Node Bridge Status" diff --git a/apps/emqx_bridge/src/schema/emqx_bridge_schema.erl b/apps/emqx_bridge/src/schema/emqx_bridge_schema.erl index c490294eb..ed2baec8f 100644 --- a/apps/emqx_bridge/src/schema/emqx_bridge_schema.erl +++ b/apps/emqx_bridge/src/schema/emqx_bridge_schema.erl @@ -208,7 +208,7 @@ desc(_) -> undefined. status() -> - hoconsc:enum([connected, disconnected, connecting]). + hoconsc:enum([connected, disconnected, connecting, inconsistent]). node_name() -> {"node", mk(binary(), #{desc => ?DESC("desc_node_name"), example => "emqx@127.0.0.1"})}.