From 63645d248c765244488cd34dbc1bb6528ca6b7c7 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 05 九月 2023 09:58:13 +0800
Subject: [PATCH] 修复编译

---
 system-service/controllers/syncEsNode.go |   76 +++++++++++++++++++-------------------
 1 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/system-service/controllers/syncEsNode.go b/system-service/controllers/syncEsNode.go
index 9c687c2..1622d53 100644
--- a/system-service/controllers/syncEsNode.go
+++ b/system-service/controllers/syncEsNode.go
@@ -1,38 +1,38 @@
-package controllers
-
-import (
-	"basic.com/pubsub/esutil.git"
-	"basic.com/valib/bhomeclient.git"
-	"vamicro/config"
-	"vamicro/system-service/sys"
-)
-
-type SyncEsNodeController struct {
-}
-
-type HostInfo struct {
-	BinPath    string   `json:"binPath"`
-	ConfigPath string   `json:"configPath"`
-	Hosts      []string `json:"hosts"`
-}
-
-//鍚屾Hosts
-func (sen *SyncEsNodeController) SynchronizeHosts(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
-	var hi HostInfo
-	c.BindJSON(&hi)
-	localIp, _, _ := sys.GetLocalIP(config.Server.NetworkAdapter)
-	localPort := "9200"
-	sp := esutil.StopServer(hi.BinPath, localIp, localPort)
-	if sp == false {
-		return &bhomeclient.Reply{Msg: "閰嶇疆鏂囦欢閿欒锛屾湰鏈篿p鑾峰彇澶辫触"}
-	}
-	_, errS := esutil.SetDiscoveryZenPingUnicastHosts(hi.ConfigPath, hi.Hosts)
-	if errS != nil {
-		return &bhomeclient.Reply{Msg: errS.Error()}
-	}
-	st := esutil.StartServer(hi.BinPath, localIp, localPort)
-	if st == false {
-		return &bhomeclient.Reply{Msg: "鏈嶅姟鍚姩瓒呮椂"}
-	}
-	return &bhomeclient.Reply{Success: true, Msg: "淇敼鎴愬姛"}
-}
+package controllers
+
+import (
+	"basic.com/pubsub/esutil.git"
+	"basic.com/valib/bhomeclient.git"
+	"vamicro/config"
+	"vamicro/system-service/sys"
+)
+
+type SyncEsNodeController struct {
+}
+
+type HostInfo struct {
+	BinPath    string   `json:"binPath"`
+	ConfigPath string   `json:"configPath"`
+	Hosts      []string `json:"hosts"`
+}
+
+//鍚屾Hosts
+func (sen *SyncEsNodeController) SynchronizeHosts(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
+	var hi HostInfo
+	c.BindJSON(&hi)
+	localIp, _, _ := sys.GetLocalIP(config.Server.NetworkAdapter)
+	localPort := "9200"
+	sp := esutil.StopServer(hi.BinPath, localIp, localPort)
+	if sp == false {
+		return &bhomeclient.Reply{Msg: "閰嶇疆鏂囦欢閿欒锛屾湰鏈篿p鑾峰彇澶辫触"}
+	}
+	_, errS := esutil.SetDiscoveryZenPingUnicastHosts(hi.ConfigPath, hi.Hosts)
+	if errS != nil {
+		return &bhomeclient.Reply{Msg: errS.Error()}
+	}
+	st := esutil.StartServer(hi.BinPath, localIp, localPort)
+	if st == false {
+		return &bhomeclient.Reply{Msg: "鏈嶅姟鍚姩瓒呮椂"}
+	}
+	return &bhomeclient.Reply{Success: true, Msg: "淇敼鎴愬姛"}
+}

--
Gitblit v1.8.0