Expand description
When to renew, and what a renewal that keeps failing looks like from the outside.
Everything in this module is pure: no network, no clock of its own — the
caller always supplies now. That is deliberate. “Renew well ahead of
expiry” and “a renewal that has been failing for days must not first
become visible as a total outage” are both decisions this module can get
wrong without ever touching a CA, so they are tested that way.
Structs§
- Renewal
Policy - When renewal is attempted, and how often a failing attempt retries.
- Renewal
Tracker - Tracks renewal attempts against one certificate’s expiry, so that a caller can ask two questions without touching the network: is a renewal due right now, and how loudly should its recent history be surfaced.
Enums§
- Alert
Level - How urgently a failing renewal should be surfaced.
Constants§
- CRITICAL_
WINDOW 🔒 - How close to expiry
AlertLevel::Criticalstarts, regardless of how many attempts have failed. An expired wildcard is a total outage, so this floor does not wait for a retry count. - WARNING_
FAILURE_ 🔒THRESHOLD - How many consecutive failures, once renewal is due, promote
OktoWarning. One is deliberately not enough — a single failed attempt an hour after the last success is exactly what the retry interval exists to absorb quietly; a pattern is what earns attention.