1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-18 05:00:03 +02:00

Minor indentation fixes.

This commit is contained in:
Henrik Hautakoski 2020-11-02 10:43:07 +01:00
parent 2a521ab333
commit 69253eaab3
2 changed files with 5 additions and 5 deletions

View file

@ -74,8 +74,8 @@ func GetHealth(params ReqParams) (Health, error) {
resp := r.Response()
body, _ := ioutil.ReadAll(resp.Body)
// Set HTTPStatusCode
health.HTTPStatusCode = resp.StatusCode
// Set HTTPStatusCode
health.HTTPStatusCode = resp.StatusCode
// Parse json
err = json.Unmarshal(body, &health)

View file

@ -56,11 +56,11 @@ func check_api_v2(p eosapi.ReqParams, offset int64) (haproxy.HealthCheckStatus,
return haproxy.HealthCheckFailed, msg
}
// Check HTTP Status Code
if health.HTTPStatusCode > 299 {
// Check HTTP Status Code
if health.HTTPStatusCode > 299 {
return haproxy.HealthCheckDown,
fmt.Sprintf("Taking offline because %v was received from backend", health.HTTPStatusCode)
}
}
// Fetch elasticsearch and nodeos block numbers from json.
var es_block int64 = 0