From 4c9b4ac26d6dcaaf1bb1ff79c135feae6fdb48bc Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期五, 26 十一月 2021 14:22:20 +0800 Subject: [PATCH] 增加接口 GetUserProfile --- cluster.go | 24 ------------------------ 1 files changed, 0 insertions(+), 24 deletions(-) diff --git a/cluster.go b/cluster.go index 6ad3258..0a9cffe 100644 --- a/cluster.go +++ b/cluster.go @@ -12,9 +12,6 @@ func (api ClusterApi) FindCluster() (flag bool,info protomsg.ClusterAndNodes) { url := DATA_URL_PREFIX + "/cluster/findCluster" netNode := getNetNode(url2Topic(Topic_System_Service,url)) - if netNode == nil { - return false,info - } client := NewClient(WithNodes(netNode)) body,err := client.DoGetRequest(url, nil,nil) if err != nil { @@ -44,9 +41,6 @@ func (api ClusterApi) Create(clusterName string, password string, virtualIp string) (bool,interface{}) { url := DATA_URL_PREFIX + "/cluster/create" netNode := getNetNode(url2Topic(Topic_System_Service,url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramBody := map[string]interface{}{ "clusterName": clusterName, @@ -69,9 +63,6 @@ func (api ClusterApi) Search(searchNum string, password string) (bool,interface{}) { url := DATA_URL_PREFIX + "/cluster/search" netNode := getNetNode(url2Topic(Topic_System_Service,url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramBody := map[string]interface{}{ "searchNum": searchNum, @@ -93,9 +84,6 @@ func (api ClusterApi) GetSearchNodes() (bool,interface{}) { url := DATA_URL_PREFIX + "/cluster/getSearchNodes" netNode := getNetNode(url2Topic(Topic_System_Service,url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) body,err := client.DoGetRequest(url, nil,nil) if err != nil { @@ -113,9 +101,6 @@ func (api ClusterApi) StopSearching(searchNum string) (bool,interface{}) { url := DATA_URL_PREFIX + "/cluster/stopSearching" netNode := getNetNode(url2Topic(Topic_System_Service,url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramBody := map[string]interface{}{ "searchNum": searchNum, @@ -136,9 +121,6 @@ func (api ClusterApi) UpdateClusterName(clusterName string, virtualIp string) (bool,interface{}) { url := DATA_URL_PREFIX + "/cluster/updateClusterName" netNode := getNetNode(url2Topic(Topic_System_Service,url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramBody := map[string]interface{}{ "clusterName": clusterName, @@ -160,9 +142,6 @@ func (api ClusterApi) Leave() (bool,interface{}) { url := DATA_URL_PREFIX + "/cluster/leave" netNode := getNetNode(url2Topic(Topic_System_Service,url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) body,err := client.DoPostRequest(url,CONTENT_TYPE_FORM, nil,nil,nil) if err != nil { @@ -181,9 +160,6 @@ func (api ClusterApi) JoinCluster(paramBody map[string]interface{}) (bool,interface{}) { url := DATA_URL_PREFIX + "/cluster/joinCluster" netNode := getNetNode(url2Topic(Topic_System_Service,url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) body,err := client.DoPostRequest(url,CONTENT_TYPE_JSON, paramBody,nil,nil) if err != nil { -- Gitblit v1.8.0