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

src/api/v1.go: in LogInfo() skip "host" if it's zero length.

This commit is contained in:
Henrik Hautakoski 2022-02-21 13:10:42 +01:00
parent d5ec841586
commit aa0b6998b8
No known key found for this signature in database
GPG key ID: 608414D93E862CCD

View file

@ -21,12 +21,18 @@ func NewEosioV1(params eosapi.ReqParams, block_time float64) EosioV1 {
}
func (e EosioV1) LogInfo() LogParams {
return LogParams{
p := LogParams{
"type", "eosio-v1",
"url", e.params.Url,
"host", e.params.Host,
"block_time", e.block_time,
}
if len(e.params.Host) > 0 {
p.Add("host", e.params.Host)
}
p.Add("block_time", e.block_time)
return p
}
func (e EosioV1) Call() (haproxy.HealthCheckStatus, string) {