Documentation
¶
Overview ¶
Package config reads and validates knell's environment configuration. All environment reads live here; the rest of the app receives the parsed Config. Malformed required values fail startup with a clear error rather than falling back: a dead-man watcher silently running with the wrong beats or webhook is worse than one that refuses to start.
Index ¶
Constants ¶
const MaxBeats = 64
MaxBeats caps how many beats one instance will watch. The cap keeps the metric label space and the notification fan-out operator-bounded; a config past it is almost certainly a generator bug.
const MinDeadline = 30 * time.Second
MinDeadline is the smallest accepted beat deadline. Anything shorter turns transient sender hiccups into alert spam; a sender that beats more often than every 30 seconds still works with a longer deadline.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Beat ¶
Beat is one watched heartbeat: an id senders ping and the silence deadline after which the beat is declared missing.
func ParseBeats ¶
ParseBeats parses the BEATS spec list: comma-separated "id:deadline" entries, e.g. "watchdog-mimir:20m,watchdog-loki:20m". IDs must match [A-Za-z0-9][A-Za-z0-9_-]{0,63} and be unique; deadlines are Go durations of at least MinDeadline.