Documentation
¶
Overview ¶
Package runner periodically executes a Probe and pushes the result into a State, invoking Reporters on transitions. Decouples probe execution from transport — transports read cached State instead of running checks per-request (matters for gRPC Watch, expensive checks, or bursty traffic).
Index ¶
Constants ¶
View Source
const ( DefaultInterval = 5 * time.Second DefaultTimeout = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Runner)
Option configures a Runner.
func RunImmediately ¶
func RunImmediately() Option
RunImmediately performs an initial check before the first tick. Default: false (state stays StatusUnknown until first tick).
func WithInterval ¶
func WithReporter ¶
func WithTimeout ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner polls a probe.Probe and updates a state.State.
Click to show internal directories.
Click to hide internal directories.