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"`
Repair string `json:"repair,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.
func (Incident) MarshalJSON ¶
func (Incident) Repository ¶
Repository identifies a default-branch outage. Other incidents concern the execution infrastructure and retain the global ordinary-start barrier.
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. Repository CI outages never prevent workers from starting, even in that repository or after failed repairs. A reserved infrastructure repair may start despite other global outages.
func (Queue) MainOutage ¶
MainOutage returns the unresolved publication barrier for exactly repo.
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.