pub struct WorkerRetryPolicy {
pub max_retries: usize,
pub initial_backoff: Duration,
pub max_backoff: Duration,
}Expand description
Bounded retry policy for worker poll acquisition and worker heartbeats.
Expected empty long polls are normal successful responses. Transport failures, HTTP 408/429 responses, and server errors are retried with capped exponential backoff. Authentication, protocol, codec, and handler failures are never retried by the worker.
Fields§
§max_retries: usizeNumber of retries after the initial request fails.
initial_backoff: DurationDelay before the first retry.
max_backoff: DurationMaximum delay between retries.
Trait Implementations§
Source§impl Clone for WorkerRetryPolicy
impl Clone for WorkerRetryPolicy
Source§fn clone(&self) -> WorkerRetryPolicy
fn clone(&self) -> WorkerRetryPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WorkerRetryPolicy
Source§impl Debug for WorkerRetryPolicy
impl Debug for WorkerRetryPolicy
Auto Trait Implementations§
impl Freeze for WorkerRetryPolicy
impl RefUnwindSafe for WorkerRetryPolicy
impl Send for WorkerRetryPolicy
impl Sync for WorkerRetryPolicy
impl Unpin for WorkerRetryPolicy
impl UnsafeUnpin for WorkerRetryPolicy
impl UnwindSafe for WorkerRetryPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more