Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateBackoff ¶
CalculateBackoff calculates the next delay for retry with exponential backoff and jitter. The baseDelay is the initial delay duration, which is exponentially increased on each retry. The jitterFactor adds randomness to the delay to avoid simultaneous retries (thundering herd problem). The delay is capped at maxDelay to prevent excessive wait times.
func ParseRateLimitHeaders ¶
ParseRateLimitHeaders parses common rate limit headers and adjusts behavior accordingly. It handles both Retry-After (in seconds or HTTP-date format) and X-RateLimit-Reset headers.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.