mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-08-30 21:28:13 +02:00
internal/api/interface.go: make Call() accept a context as parameter.
This commit is contained in:
parent
b815bcee44
commit
dbf59d1305
10 changed files with 47 additions and 30 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/eosswedenorg-go/haproxy/agentcheck"
|
||||
|
|
@ -43,7 +44,8 @@ func (e AntelopeV2) LogInfo() LogParams {
|
|||
return p
|
||||
}
|
||||
|
||||
func (e AntelopeV2) Call() (agentcheck.Response, string) {
|
||||
func (e AntelopeV2) Call(ctx context.Context) (agentcheck.Response, string) {
|
||||
// TODO: Pass context
|
||||
health, err := e.client.GetHealth()
|
||||
if err != nil {
|
||||
resp := agentcheck.NewStatusMessageResponse(agentcheck.Fail, "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue