Documentation
¶
Overview ¶
Package fatal owns the persistent, machine-local outage queue. It deliberately does not depend on the supervisor, hooks, board or main configuration loader.
Index ¶
Constants ¶
const File = "fatal.json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Incident ¶
type Incident struct {
ID string `json:"id"`
Evidence string `json:"evidence"`
Owner string `json:"owner,omitempty"`
Opened time.Time `json:"opened"`
Resolved time.Time `json:"resolved,omitzero"`
LastAttempt time.Time `json:"lastAttempt,omitzero"`
Attempts int `json:"attempts"`
Outcome string `json:"outcome,omitempty"`
}
Incident survives restarts. Only a successful probe resolves an outage; finishing a repair session never does. Attempts are reserved before launch.
type Observation ¶
Observation distinguishes a failed probe from one that could not run, and from a component deliberately disabled by its owner.
type Queue ¶
type Queue struct {
Incidents []Incident `json:"incidents"`
}
func (Queue) Barrier ¶
Barrier leaves existing work running, admitting only the reserved repair owner while an outage stands. A display name cannot grant stop/hold bypass.
func (*Queue) Observe ¶
func (q *Queue) Observe(o Observation, now time.Time) string
Observe returns a transition message, empty for a repeated observation. Unknown never clears a known outage. Disabled explicitly withdraws it.