Module qcs_api_client_common::backoff
source · 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§
- Constants for the exponential backoff policy.
Structs§
SystemClockuses the system’s clock to get the current time. This Clock should be used for real use-cases.
Enums§
- Error is the error value in an operation’s result.
Traits§
- Clock returns the current time.
- Notify is called in
retry_notifyin case of errors.
Functions§
- Create a default
ExponentialBackofffor use with QCS. - Return
Someif the error is one that makes sense to retry andmethodis one that indicates it is safe to retry. - Return
Someif the error is one that makes sense to retry andmethodis one that indicates it is safe to retry. - Return
Someif the response specifies aRetry-Afterheader or the providedbackoffhas another backoff to try. - Retries this operation according to the backoff policy. backoff is reset before it is used.
- 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.
- Return
trueif the status code is one that could be retried.
Type Aliases§
- Exponential backoff policy with system’s clock.
- Builder for exponential backoff policy with system’s clock.