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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0aeafbf  Update ha document about YAML (#14181)
0aeafbf is described below

commit 0aeafbf54132846c821433d9ff373bbc23f24a30
Author: zhaojinchao <[email protected]>
AuthorDate: Tue Dec 21 13:55:11 2021 +0800

    Update ha document about YAML (#14181)
    
    * Update ha document about YAML
    
    * update
    
    * update doc
---
 .../shardingsphere-jdbc/yaml-config/rules/ha.cn.md | 27 +++++++++++++++++++++-
 .../shardingsphere-jdbc/yaml-config/rules/ha.en.md | 25 +++++++++++++++++++-
 2 files changed, 50 insertions(+), 2 deletions(-)

diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
index d8c4af6..a6d9769 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
@@ -3,4 +3,29 @@ title = "高可用"
 weight = 3
 +++
 
-TODO
+## 配置项说明
+
+```yaml
+rules:
+- !DB_DISCOVERY
+  dataSources:
+    <data-source-name> (+): # 逻辑数据源名称
+      dataSourceNames: # 数据源名称列表
+        - <data-source>
+        - <data-source>
+      discoveryHeartbeatName: # 检测心跳名称
+      discoveryTypeName: # 高可用类型名称
+  
+  # 心跳检测配置
+  discoveryHeartbeats:
+    <discovery-heartbeat-name> (+): # 心跳名称
+      props:
+        keep-alive-cron: # cron 表达式,如:'0/5 * * * * ?'
+  
+  # 高可用类型配置
+  discoveryTypes:
+    <discovery-type-name> (+): # 高可用类型名称
+      type: # 高可用类型,如: MGR、openGauss 
+      props (?):
+        group-name: 92504d5b-6dec-11e8-91ea-246e9612aaf1 # 高可用类型必要参数,如 MGR 的 
group-name
+```
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
index fdbdfbf..9f32e90 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
@@ -3,4 +3,27 @@ title = "HA"
 weight = 3
 +++
 
-TODO
+```yaml
+rules:
+- !DB_DISCOVERY
+  dataSources:
+    <data-source-name> (+): # Logic data source name
+      dataSourceNames: # Data source names
+        - <data-source>
+        - <data-source>
+      discoveryHeartbeatName: # Detect heartbeat name
+      discoveryTypeName: # Highly available type name
+  
+  # Heartbeat Configuration
+  discoveryHeartbeats:
+    <discovery-heartbeat-name> (+): # heartbeat name
+      props:
+        keep-alive-cron: # This is cron expression, such as:'0/5 * * * * ?'
+  
+  # Highly available Configuration
+  discoveryTypes:
+    <discovery-type-name> (+): # Highly available type name
+      type: # Highly available type, such as: MGR、openGauss
+      props (?):
+        group-name: 92504d5b-6dec-11e8-91ea-246e9612aaf1 # Required parameters 
for high-availability types, such as MGR's group-name
+```

Reply via email to