Peter Kurfer
4c2aa968d2
- support config file - support reading checks, server definition and endpoint definitions from env
29 lines
513 B
Go
29 lines
513 B
Go
package check
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
"github.com/baez90/nurse/config"
|
|
"github.com/baez90/nurse/grammar"
|
|
)
|
|
|
|
var (
|
|
ErrNoSuchCheck = errors.New("no such check")
|
|
ErrConflictingCheck = errors.New("check with same name already registered")
|
|
)
|
|
|
|
type (
|
|
Unmarshaler interface {
|
|
UnmarshalCheck(c grammar.Check, lookup config.ServerLookup) error
|
|
}
|
|
|
|
SystemChecker interface {
|
|
Unmarshaler
|
|
Execute(ctx context.Context) error
|
|
}
|
|
|
|
CallUnmarshaler interface {
|
|
UnmarshalCall(c grammar.Call) error
|
|
}
|
|
)
|