Skip to main content

Module retry

Module retry 

Source

Re-exports§

pub use retry_api::NamedRetryPolicy;
pub use retry_api::PredicateValue;
pub use retry_api::RetryPolicy;
pub use retry_api::RetryPredicate;

Structs§

RetryPolicyGuard
Guard that restores the previous state of a named retry policy on drop. If the policy existed before, it is restored; if it was newly added, it is removed.

Functions§

get_retry_policies
Get all retry policies active for this agent.
get_retry_policy_by_name
Get a specific retry policy by name.
remove_retry_policy
Remove a named retry policy by name (persisted to oplog).
resolve_retry_policy
Resolve the matching retry policy for a given operation context. Evaluates named policies in descending priority order; returns the policy from the first rule whose predicate matches, or none.
set_retry_policy
Add or overwrite a named retry policy (persisted to oplog). If a policy with the same name exists, it is replaced.
use_retry_policy
Temporarily sets a named retry policy. When the returned guard is dropped, the previous policy with the same name is restored (or removed if it didn’t exist).
with_retry_policy
Executes the given function with a named retry policy temporarily set.
with_retry_policy_async
Executes the given async function with a named retry policy temporarily set.