Skip to main content

Module retry

Module retry 

Source
Expand description

Retry policy and helper (port of Go retry.go).

Structs§

RetryPolicy
Retry policy: exponential backoff with a maximum number of attempts. Defaults match the Go reference driver: 3 attempts, 1s initial backoff, 30s max backoff, multiplier 2.0. No jitter.

Functions§

retry
Run op with retries according to policy. Retries only errors for which crate::error::Error::is_retryable is true. Returns the last error after exhausting attempts, or immediately on success / non-retryable error.