mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-07-02 11:43:42 +02:00
server.go: change status log output + add version to it.
This commit is contained in:
parent
94cdc7117c
commit
da5eef75d2
1 changed files with 3 additions and 1 deletions
|
|
@ -147,10 +147,12 @@ func main() {
|
||||||
if version == "v2" {
|
if version == "v2" {
|
||||||
status, msg = check_api_v2(host, port, int64(block_time / 2))
|
status, msg = check_api_v2(host, port, int64(block_time / 2))
|
||||||
} else {
|
} else {
|
||||||
|
version = "v1"
|
||||||
status, msg = check_api(host, port, float64(block_time))
|
status, msg = check_api(host, port, float64(block_time))
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("- %s:%d (%d blocks): %s, %s\n", host, port, block_time / 2, status, msg)
|
fmt.Printf("[Status %s] %s:%d (%d blocks): %s, %s\n",
|
||||||
|
version, host, port, block_time / 2, status, msg)
|
||||||
|
|
||||||
// Report status to HAproxy
|
// Report status to HAproxy
|
||||||
c.Send(fmt.Sprintln(status))
|
c.Send(fmt.Sprintln(status))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue