From 71b8885babe6dfd25c91b007018347c0c1bfac74 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期五, 20 十月 2023 17:35:52 +0800
Subject: [PATCH] 添加主节点变更和主动切换功能

---
 system-service/vo/cluster.go |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/system-service/vo/cluster.go b/system-service/vo/cluster.go
index f014a52..328f323 100644
--- a/system-service/vo/cluster.go
+++ b/system-service/vo/cluster.go
@@ -1,24 +1,30 @@
 package vo
 
 import "vamicro/system-service/models"
+
 type ClusterVo struct {
 	ClusterInfo models.Cluster `json:"clusterInfo"`
-	Nodes []models.Node `json:"nodes"`
+	Nodes       []models.Node  `json:"nodes"`
 }
 
 type ClusterCreateVo struct {
-	Password string `json:"password"`
+	Password    string `json:"password"`
 	ClusterName string `json:"clusterName"`
-	ClusterId string `json:"clusterId"`
-	VirtualIp string `json:"virtualIp"`
+	ClusterId   string `json:"clusterId"`
+	VirtualIp   string `json:"virtualIp"`
 }
 
 type ClusterSearchVo struct {
 	Password string `json:"password"`
 }
 
-type ClusterJoinVo struct {
+type UpdateClusterVo struct {
 	ClusterId string `json:"clusterId"`
-	Password string `json:"password"`
-	NodeIps []string `json:"nodeIps"`
+	NodeId    string `json:"nodeId"`
+}
+
+type ClusterJoinVo struct {
+	ClusterId string   `json:"clusterId"`
+	Password  string   `json:"password"`
+	NodeIps   []string `json:"nodeIps"`
 }

--
Gitblit v1.8.0