Struct qp2p::config::RetryConfig [−][src]
pub struct RetryConfig {
pub initial_retry_interval: Duration,
pub max_retry_interval: Duration,
pub retry_delay_multiplier: f64,
pub retry_delay_rand_factor: f64,
pub retrying_max_elapsed_time: Duration,
}
Expand description
Retry configurations for establishing connections and sending messages. Determines the retry behaviour of requests, by setting the back off strategy used.
Fields
initial_retry_interval: Duration
The initial retry interval.
This is the first delay before a retry, for establishing connections and sending messages.
The subsequent delay will be decided by the retry_delay_multiplier
.
max_retry_interval: Duration
The maximum value of the back off period. Once the retry interval reaches this value it stops increasing.
This is the longest duration we will have,
for establishing connections and sending messages.
Retrying continues even after the duration times have reached this duration.
The number of retries before that happens, will be decided by the retry_delay_multiplier
.
The number of retries after that, will be decided by the retrying_max_elapsed_time
.
retry_delay_multiplier: f64
The value to multiply the current interval with for each retry attempt.
retry_delay_rand_factor: f64
The randomization factor to use for creating a range around the retry interval.
A randomization factor of 0.5 results in a random period ranging between 50% below and 50% above the retry interval.
retrying_max_elapsed_time: Duration
The maximum elapsed time after instantiating
Retrying continues until this time has elapsed. The number of retries before that happens, will be decided by the other retry config options.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for RetryConfig
impl Send for RetryConfig
impl Sync for RetryConfig
impl Unpin for RetryConfig
impl UnwindSafe for RetryConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more