mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-18 05:00:03 +02:00
Refactor: move internal package from src/ to internal/ and move src/main.go to cmd/eosio-api-healthcheck/main.go
This commit is contained in:
parent
c27abb5ed9
commit
6448aeb0f7
22 changed files with 19 additions and 17 deletions
|
|
@ -1,33 +0,0 @@
|
|||
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/eosswedenorg-go/haproxy/agentcheck"
|
||||
)
|
||||
|
||||
/**
|
||||
* Generic struct that is passed to factory functions
|
||||
* to configure the API request.
|
||||
*/
|
||||
type ApiArguments struct {
|
||||
Url string
|
||||
Host string
|
||||
NumBlocks int
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory function
|
||||
*
|
||||
* Each API must implement this function and process `args`
|
||||
* returing a instance of it's implementation of the ApiInterface
|
||||
*/
|
||||
type Factory func(args ApiArguments) ApiInterface
|
||||
|
||||
type ApiInterface interface {
|
||||
|
||||
// Returns Logging information
|
||||
LogInfo() LogParams
|
||||
|
||||
// Call api and validate it's status.
|
||||
Call() (agentcheck.Response, string)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue