Documentation
¶
Overview ¶
Package reporter defines a side-effect interface invoked on probe status transitions. Implementations: logging, metrics emission, alerting hooks.
Reporters are called synchronously from the runner.Runner tick goroutine. A slow reporter blocks the next tick — keep work fast or dispatch to a worker pool inside your implementation. The Multi adapter calls children sequentially for the same reason.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
// Name is the probe identifier set via runner.WithName.
// Empty when the runner has no name configured.
Name string
// Prev is the status before the transition.
Prev probe.Status
// Cur is the new status.
Cur probe.Status
// PrevReason and Reason describe the old and new observations. Reporters
// also receive reason-only changes while the status remains unhealthy.
PrevReason string
Reason string
}
Event describes a probe status transition.
Fields are extensible: future additions (e.g. duration, last error) can be appended without breaking existing Reporter implementations.
Click to show internal directories.
Click to hide internal directories.