Documentation
¶
Overview ¶
Package schedule holds the pure timing functions of bentoo-tray: the startup delay, the jittered check interval and the failure backoff. Randomness is injected as r in [0,1) so every bound is testable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Backoff ¶
Backoff returns the delay after the given number of consecutive failures: 5 minutes doubled per failure beyond the first, capped at 24 hours, and never shorter than retryAfter. The doubling stops at the cap before it could overflow; a count below 1 is treated as 1.
func NextInterval ¶
NextInterval returns base varied by ±20%: base × [0.8, 1.2).
func StartupDelay ¶
StartupDelay returns the delay before the first fetch, 1 to 5 minutes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.