simplify path reservation

This commit is contained in:
mr
2024-10-02 10:45:52 +02:00
parent f9bfafa004
commit 3c1a84011e
9 changed files with 31 additions and 32 deletions

View File

@@ -73,7 +73,7 @@ func (a *API) GetState() (State, int, error) {
// CheckRemotePeer checks the state of a remote peer
func (a *API) CheckRemotePeer(url string) (State, map[string]int) {
// Check if the database is up
caller := NewHTTPCaller(map[string]map[METHOD]string{}) // Create a new http caller
caller := NewHTTPCaller(map[DataType]map[METHOD]string{}) // Create a new http caller
var resp APIStatusResponse
b, err := caller.CallPost(url, "/status", map[string]interface{}{}) // Call the status endpoint of the peer
if err != nil {
@@ -94,7 +94,7 @@ func (a *API) CheckRemotePeer(url string) (State, map[string]int) {
func (a *API) CheckRemoteAPIs(urls map[string]string) (State, map[string]string, error) {
// Check if the database is up
new := map[string]string{}
caller := NewHTTPCaller(map[string]map[METHOD]string{}) // Create a new http caller
caller := NewHTTPCaller(map[DataType]map[METHOD]string{}) // Create a new http caller
code := 0
e := ""
state := ALIVE