sqlite的api,便于内部使用
liuxiaolong
2019-08-22 d2279f4dba80efef9a08641e633b11b66430c2aa
cluster.go
@@ -6,6 +6,22 @@
}
func (api ClusterApi) FindCluster() (bool,interface{}) {
   url := BASIC_URL + DATA_URL_PREFIX + "/cluster/findCluster"
   client := NewClient()
   body,err := client.DoGetRequest(url, nil,nil)
   if err != nil {
      return false,nil
   }
   var res Result
   if err = json.Unmarshal(body, &res); err != nil {
      return false,nil
   }
   return res.Success,res.Data
}
func (api ClusterApi) Create(clusterName string, password string) (bool,interface{}) {
   url := BASIC_URL + DATA_URL_PREFIX + "/cluster/create"
   client := NewClient()
@@ -47,7 +63,7 @@
}
func (api ClusterApi) GetSearchNodes() (bool,interface{}) {
   url := BASIC_URL + DATA_URL_PREFIX + "/cluster/getNodesByNum"
   url := BASIC_URL + DATA_URL_PREFIX + "/cluster/getSearchNodes"
   client := NewClient()
   body,err := client.DoGetRequest(url, nil,nil)
   if err != nil {