| | |
| | | func UpdateAllNodesScriptArgument(nowPeers []interface{}) { |
| | | for _, val := range nowPeers { |
| | | ip := val.(string) |
| | | fmt.Println("ip: ", ip) |
| | | url := "http://" + ip + ":7020/node/api-v/swfs/updateSWFSService" |
| | | fmt.Println("url", url) |
| | | http.Get(url) |
| | | } |
| | | } |
| | |
| | | //向集群加入新的master |
| | | func AddNewMasterToPeers() (result bool) { |
| | | peer := config.Server.EsServerIp + ":6333" |
| | | addUrl := "http://" + config.Server.EsServerIp + ":" + config.Server.EsServerPort + "/" + config.BasicFS.IndexName + "/_update_by_query" |
| | | addUrl := "http://" + config.Server.EsServerIp + ":" + config.Server.EsServerPort + "/" + config.BasicFS.IndexName + "/_update_by_query?refresh=true" |
| | | addJson := `{ |
| | | "script": { |
| | | "lang": "painless", |