Instead of a function type with a specific signature, a check should be a struct/object satisfying the Check interface, specified as following:
// Check is a unified interface for health checks, it defines only the minimal
// necessary behaviors, while allowing each check to parse and store type-safe
// parameters.
type Check interface {
// ID is a uniquely identifying check name, like "running" or "temp"
ID() string
// New both validates the JSON-provided parameters (list of strings),
// and parses and stores them in an internal, typed field for later access.
New(parameters []string) (Check, error)
// Status returns the status of the check at the instant it is called.
//
// msg is a descriptive, human-readable description of the status.
//
// code is exit code defining whether or not this check is passing. 0 is
// considered passing, 1 is failing, with other values reserved for later
// use.
Status() (code int, msg string, err error)
}
Additionally:
[x] Comments above the structs should be in valid Markdown, and be copied to the wiki
Instead of a function type with a specific signature, a check should be a struct/object satisfying the Check interface, specified as following:
Additionally:
The current work is live in this branch.