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

src/api/debug.go: Adding DebugApiFactory function

This commit is contained in:
Henrik Hautakoski 2022-10-25 17:31:36 +02:00
parent 6e8ffe718e
commit 39927a2441
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
2 changed files with 16 additions and 0 deletions

View file

@ -25,6 +25,10 @@ func parseResponse(resp string) (agentcheck.Response, error) {
return agentcheck.NewStatusResponse(rtype), nil
}
func DebugApiFactory(args ApiArguments) ApiInterface {
return NewDebugApi(args.Url)
}
func NewDebugApi(response string) DebugApi {
resp, _ := parseResponse(response)