diff --git a/tools/api.go b/tools/api.go index 6991acf..ec27a18 100644 --- a/tools/api.go +++ b/tools/api.go @@ -3,6 +3,7 @@ package tools import ( "encoding/json" "errors" + "fmt" "cloud.o-forge.io/core/oc-lib/dbs/mongo" ) @@ -66,14 +67,17 @@ func (a *API) CheckRemotePeer(url string) (State, map[string]int) { caller := NewHTTPCaller(map[string]map[METHOD]string{}) var resp APIStatusResponse b, err := caller.CallPost(url, "/status", []string{}) + fmt.Println("CheckRemotePeer", b, err) if err != nil { return DEAD, map[string]int{} } json.Unmarshal(b, &resp) + fmt.Println("CheckRemotePeer2", b, err) if resp.Data == nil { return DEAD, map[string]int{} } new := map[string]int{} + fmt.Println("CheckRemotePeer", resp.Data.Services) for k, v := range resp.Data.Services { new[k] = ToState(v).EnumIndex() }