mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-07-02 11:43:42 +02:00
Minor indentation fixes.
This commit is contained in:
parent
2a521ab333
commit
69253eaab3
2 changed files with 5 additions and 5 deletions
|
|
@ -74,8 +74,8 @@ func GetHealth(params ReqParams) (Health, error) {
|
||||||
resp := r.Response()
|
resp := r.Response()
|
||||||
body, _ := ioutil.ReadAll(resp.Body)
|
body, _ := ioutil.ReadAll(resp.Body)
|
||||||
|
|
||||||
// Set HTTPStatusCode
|
// Set HTTPStatusCode
|
||||||
health.HTTPStatusCode = resp.StatusCode
|
health.HTTPStatusCode = resp.StatusCode
|
||||||
|
|
||||||
// Parse json
|
// Parse json
|
||||||
err = json.Unmarshal(body, &health)
|
err = json.Unmarshal(body, &health)
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,11 @@ func check_api_v2(p eosapi.ReqParams, offset int64) (haproxy.HealthCheckStatus,
|
||||||
return haproxy.HealthCheckFailed, msg
|
return haproxy.HealthCheckFailed, msg
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check HTTP Status Code
|
// Check HTTP Status Code
|
||||||
if health.HTTPStatusCode > 299 {
|
if health.HTTPStatusCode > 299 {
|
||||||
return haproxy.HealthCheckDown,
|
return haproxy.HealthCheckDown,
|
||||||
fmt.Sprintf("Taking offline because %v was received from backend", health.HTTPStatusCode)
|
fmt.Sprintf("Taking offline because %v was received from backend", health.HTTPStatusCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch elasticsearch and nodeos block numbers from json.
|
// Fetch elasticsearch and nodeos block numbers from json.
|
||||||
var es_block int64 = 0
|
var es_block int64 = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue