Expand description
Exponential backoff for use with QCS.
This re-exports types from backoff and provides a default_backoff function
to create a more useful default [ExpontentialBackoff].
Modules§
- backoff
- default
- Constants for the exponential backoff policy.
- exponential
- future
Structs§
- System
Clock SystemClockuses the system’s clock to get the current time. This Clock should be used for real use-cases.
Enums§
- Error
- Error is the error value in an operation’s result.
Traits§
- Clock
- Clock returns the current time.
- Notify
- Notify is called in
retry_notifyin case of errors.
Functions§
- default_
backoff - Create a default
ExponentialBackofffor use with QCS. - duration_
from_ io_ error - Return
Someif the error is one that makes sense to retry andmethodis one that indicates it is safe to retry. - duration_
from_ reqwest_ error - Return
Someif the error is one that makes sense to retry andmethodis one that indicates it is safe to retry. - duration_
from_ response - Return
Someif the response specifies aRetry-Afterheader or the providedbackoffhas another backoff to try. IfNoneis returned, the request should not be retried. - retry
- Retries this operation according to the backoff policy. backoff is reset before it is used.
- retry_
notify - Retries this operation according to the backoff policy. Calls notify on failed attempts (in case of transient errors). backoff is reset before it is used.
- status_
code_ is_ retry - Return
trueif the status code is one that could be retried.
Type Aliases§
- Exponential
Backoff - Exponential backoff policy with system’s clock.
- Exponential
Backoff Builder - Builder for exponential backoff policy with system’s clock.