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:
parent
d5ec841586
commit
aa0b6998b8
1 changed files with 9 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue