| | |
| | | |
| | | //请求作为主节点操作流程 |
| | | func RequestMasterNodesOperation(nowPeers []interface{}) { |
| | | //fmt.Println("config.Server.CoreBaseUnit", config.Server.CoreBaseUnit) |
| | | coreBaseUnit, _ := strconv.Atoi(config.Server.CoreBaseUnit) |
| | | //fmt.Println("nowPeers: ", nowPeers) |
| | | //fmt.Println("coreBaseUnit: ", coreBaseUnit) |
| | | UpdateAllNodesScriptArgument(nowPeers) |
| | | RestartAllServer(nowPeers, coreBaseUnit) |
| | | } |
| | |
| | | |
| | | //作为数据节点加入 |
| | | func AsVolume() { |
| | | UpdatePeers(config.Server.ScriptPath, StartServerScript, GetNewPeers(), GetNewPeers()) |
| | | ReplaceLineContentBySearch(StartScriptAsVolume, config.Server.ScriptPath, StartServerScript) |
| | | ReplaceLineContentBySearch("peers=", config.Server.ScriptPath, StartServerScript) |
| | | StartServer(config.Server.ScriptPath) |
| | | } |
| | | |