Skip to main content

Module retry

Module retry 

Source

Re-exports§

pub use builder::NamedPolicy;
pub use builder::Policy;
pub use builder::Predicate;
pub use builder::Props;
pub use builder::RetryBuilderError;
pub use builder::Value;
pub use retry_api::NamedRetryPolicy;
pub use retry_api::PredicateValue;
pub use retry_api::RetryPolicy;
pub use retry_api::RetryPredicate;

Modules§

builder

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_named_policy
Add or overwrite a high-level named retry policy after validating and flattening it into the raw WIT representation.
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_named_policy
Temporarily sets a high-level named retry policy after validating and flattening it into the raw WIT representation.
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_named_policy
Executes the given function with a high-level named retry policy temporarily set.
with_named_policy_async
Executes the given async function with a high-level named retry policy temporarily set.
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.