Documentation
¶
Overview ¶
Package runmarker detects an unclean stop of the control plane. A marker file written at boot and marked clean at graceful shutdown tells the next boot whether the previous run was killed, and the kernel's oom_kill counter says whether the host killed it for memory.
Index ¶
Constants ¶
View Source
const (
// EnvWindow sets how long an unclean restart stays in the attention feed.
EnvWindow = "APP_UNCLEAN_RESTART_WINDOW"
)
Variables ¶
This section is empty.
Functions ¶
func Begin ¶
Begin reads the previous marker, records an incident when it was not clean and writes a fresh marker for this run. It returns the incident or nil.
Types ¶
type Incident ¶
type Incident struct {
At time.Time `json:"at"`
PrevStartedAt time.Time `json:"prev_started_at"`
PrevPID int `json:"prev_pid"`
OOMLikely bool `json:"oom_likely"`
}
Incident is one boot that found the previous run had not stopped cleanly.
Click to show internal directories.
Click to hide internal directories.