Skip to main content

plan

Function plan 

Source
pub(super) fn plan(
    (prev_failures, prev_disabled_logged): (u32, bool),
    outcome: &ProbeOutcome,
) -> (Plan, Option<HealthLog>)
Expand description

Pure decision: from the prior (failure streak, already-logged) and a fresh probe outcome, compute the next state, the re-probe interval, and whether to emit a one-time health-transition log. Split out so the back-off growth and log-once behaviour are unit-testable without a real loginctl.