pub struct RetryManager { /* private fields */ }Expand description
Retry manager with budget tracking and adaptive policies
Implementations§
Source§impl RetryManager
impl RetryManager
Sourcepub fn new(policy: RetryPolicy) -> Self
pub fn new(policy: RetryPolicy) -> Self
Create a new retry manager
Sourcepub fn GetEventTransmitter(&self) -> Sender<RetryEvent>
pub fn GetEventTransmitter(&self) -> Sender<RetryEvent>
Get the retry event transmitter for subscription
Sourcepub fn CalculateRetryDelay(&self, Attempt: u32) -> Duration
pub fn CalculateRetryDelay(&self, Attempt: u32) -> Duration
Calculate next retry delay with exponential backoff and jitter
Sourcepub fn CalculateAdaptiveRetryDelay(
&self,
ErrorType: &str,
attempt: u32,
) -> Duration
pub fn CalculateAdaptiveRetryDelay( &self, ErrorType: &str, attempt: u32, ) -> Duration
Calculate adaptive retry delay based on error classification
Sourcepub fn ClassifyError(&self, ErrorMessage: &str) -> ErrorClass
pub fn ClassifyError(&self, ErrorMessage: &str) -> ErrorClass
Classify an error for adaptive retry behavior
Sourcepub async fn CanRetry(&self, service: &str) -> bool
pub async fn CanRetry(&self, service: &str) -> bool
Check if retry is possible within budget Validates budget state before allowing retry
Sourcepub fn PublishRetryEvent(&self, event: RetryEvent)
pub fn PublishRetryEvent(&self, event: RetryEvent)
Publish a retry event for telemetry integration
Sourcepub fn ValidatePolicy(&self) -> Result<(), String>
pub fn ValidatePolicy(&self) -> Result<(), String>
Validate retry policy configuration
Auto Trait Implementations§
impl Freeze for RetryManager
impl !RefUnwindSafe for RetryManager
impl Send for RetryManager
impl Sync for RetryManager
impl Unpin for RetryManager
impl !UnwindSafe for RetryManager
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
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].