Expand description
Shared HTTP layer of the providers: token bucket per provider API, jittered
retry, token caching, and (feature http) the reqwest-based client.
Re-exports§
pub use bucket::TokenBucket;pub use retry::JitterRng;pub use retry::RetryPolicy;pub use retry::parse_retry_after;pub use token::AccessToken;pub use token::REFRESH_MARGIN;pub use token::SecretString;pub use token::StaticToken;pub use token::TokenCache;pub use token::TokenFetcher;pub use token::TokenSource;
Modules§
- bucket
- Token bucket per provider API, so a burst of wakes never exceeds an API
quota (Kubernetes API priority, ECS
RunTask20/s, Fly 1 req/s per action). - retry
- Jittered exponential backoff for 429 / 5xx / network errors (C9).
- token
- Credentials seen by the shared HTTP layer: a
TokenSourcegives a bearer token (or signs a request in theauth-*crates), andTokenCachekeeps it untilexp - 5 minwith one forced refresh on 401 (plan §6, C8).