Skip to main content

Module retry

Module retry 

Source
Expand description

Jittered exponential backoff for 429 / 5xx / network errors (C9).

Structs§

JitterRng
A tiny SplitMix64 generator for jitter. Not cryptographic; seeded from the std RandomState by default or from a fixed seed in simulations.
RetryPolicy
Retry policy: max_attempts tries in total, delay of attempt n (from 0) uniformly in [d/2, d] with d = min(base * 2^n, max_delay) (“equal jitter”), or the server’s Retry-After when longer (capped at max_delay).

Functions§

parse_retry_after
Parses a Retry-After header given in seconds (the HTTP-date form is not used by the provider APIs graphrt talks to and is ignored).