pub struct RetryParams {
pub attempts: u32,
pub retry_post: bool,
pub backoff_base_ms: u64,
pub backoff_cap_ms: u64,
pub retry_statuses: Vec<u16>,
pub retry_transport: bool,
pub budget_percent: u32,
pub buffer_max_bytes: u64,
pub hedge: HedgeParams,
pub total_deadline: Option<Duration>,
pub buffer_first_frame_bytes: u64,
}Expand description
Resolved (validated) retry parameters for one upstream. attempts == 0
disables retries entirely — the single-attempt path then performs no
body buffering and no extra per-request work (the budget denominator is
still recorded: the window counts all proxied traffic).
Fields§
§attempts: u32Maximum retries beyond the first attempt.
retry_post: boolWhether POST requests may be retried (opt-in). Governs POST only: other non-idempotent methods (DELETE, PATCH, …) are never retried.
backoff_base_ms: u64Backoff base (milliseconds).
backoff_cap_ms: u64Backoff ceiling (milliseconds).
retry_statuses: Vec<u16>Response statuses that trigger a retry.
retry_transport: boolWhether transport errors and per-attempt read timeouts trigger a retry.
budget_percent: u32Retry budget percentage in (0, 100].
buffer_max_bytes: u64Request-body buffering cap in bytes.
hedge: HedgeParamsRequest hedging parameters (DW-063).
total_deadline: Option<Duration>Cross-attempt total retry deadline (REL-01): caps the wall-clock
time from the first attempt to the last, INCLUDING backoff delays.
None leaves the cross-attempt budget unbounded (the default).
buffer_first_frame_bytes: u64Streaming failover first-frame buffer cap in bytes (REL-05, #216). When > 0, the proxy buffers up to this many bytes of the upstream response body before forwarding any bytes to the client, so a mid-body failure before the buffer fills can still trigger a retry to a different endpoint. Default 0 = no first-frame buffering (v1 behavior).
Implementations§
Source§impl RetryParams
impl RetryParams
Sourcepub fn from_config(cfg: Option<&RetryConfig>) -> Self
pub fn from_config(cfg: Option<&RetryConfig>) -> Self
Resolve from the config form; None yields the disabled default
(serde has already applied per-field defaults for a present block).
Sourcepub fn retries_status(&self, status: u16) -> bool
pub fn retries_status(&self, status: u16) -> bool
Whether a response status triggers a retry under these parameters.
Trait Implementations§
Source§impl Clone for RetryParams
impl Clone for RetryParams
Source§fn clone(&self) -> RetryParams
fn clone(&self) -> RetryParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RetryParams
impl Debug for RetryParams
Source§impl Default for RetryParams
impl Default for RetryParams
Source§impl PartialEq for RetryParams
impl PartialEq for RetryParams
impl StructuralPartialEq for RetryParams
Auto Trait Implementations§
impl Freeze for RetryParams
impl RefUnwindSafe for RetryParams
impl Send for RetryParams
impl Sync for RetryParams
impl Unpin for RetryParams
impl UnwindSafe for RetryParams
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more