| | |
| | | if httpRes.StatusCode == 200 { |
| | | startupItem = string(body) |
| | | } |
| | | fmt.Println("Restart startupItem: ", startupItem) |
| | | tick := time.Tick(1 * time.Second) |
| | | fmt.Println("准备开始验证节点服务") |
| | | for countdown := timeOut; countdown > 0; countdown-- { |
| | |
| | | //验证服务状态 |
| | | func Verification(startupItem string, ip string) bool { |
| | | resStatu := false |
| | | fmt.Println("Verification startupItem: ", startupItem) |
| | | switch startupItem { |
| | | case StartScriptAsVolume: |
| | | verificationVolumeUrl := "http://" + ip + ":6700/ui/index.html" |
| | |
| | | verificationMasterUrl := "http://" + ip + ":6333" |
| | | verificationVolumeUrl := "http://" + ip + ":6700/ui/index.html" |
| | | _, masterErr := http.Get(verificationMasterUrl) |
| | | fmt.Println("masterErr", masterErr) |
| | | _, volume1Err := http.Get(verificationVolumeUrl) |
| | | fmt.Println("volume1Err", volume1Err) |
| | | if masterErr == nil && volume1Err == nil { |
| | | resStatu = true |
| | | } |