Documentation
¶
Overview ¶
Package check defines the interface for host check plugins.
Index ¶
Constants ¶
View Source
const DefaultTimeout = 60 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check interface {
// Name returns the unique name of the check.
Name() string
// Description returns a human-readable description.
Description() string
// Run executes the check against the given hostname.
Run(ctx context.Context, hostname string, cfg map[string]any) Result
}
Check is the interface that all plugins must implement.
type Result ¶
type Result struct {
Name string `json:"name"`
Status Status `json:"status"`
Message string `json:"message"`
Details []string `json:"details,omitempty"`
Duration string `json:"duration"`
Tasks []ResultTask `json:"tasks,omitempty"`
AdditionalHosts []string `json:"additional_hosts,omitempty"`
}
Result represents the outcome of a check.
type ResultTask ¶
Click to show internal directories.
Click to hide internal directories.