1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-08-31 21:38:12 +02:00

internal/api/interface.go: make Call() accept a context as parameter.

This commit is contained in:
Henrik Hautakoski 2023-02-06 14:20:09 +01:00
parent b815bcee44
commit dbf59d1305
No known key found for this signature in database
GPG key ID: 217490840C18A5D9
10 changed files with 47 additions and 30 deletions

View file

@ -1,6 +1,7 @@
package api
import (
"context"
"fmt"
"github.com/eosswedenorg-go/atomicasset"
@ -35,7 +36,8 @@ func (e AtomicAsset) LogInfo() LogParams {
}
}
func (e AtomicAsset) Call() (agentcheck.Response, string) {
func (e AtomicAsset) Call(ctx context.Context) (agentcheck.Response, string) {
// TODO: Pass context
h, err := e.client.GetHealth()
if err != nil {
resp := agentcheck.NewStatusMessageResponse(agentcheck.Fail, "")