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:
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()
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
|
||||
// Set HTTPStatusCode
|
||||
health.HTTPStatusCode = resp.StatusCode
|
||||
// Set HTTPStatusCode
|
||||
health.HTTPStatusCode = resp.StatusCode
|
||||
|
||||
// Parse json
|
||||
err = json.Unmarshal(body, &health)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue