pub struct RotationConfig {
pub failure_threshold: usize,
pub backoff_duration: Duration,
pub max_backoff_duration: Duration,
pub health_check_interval: Duration,
pub health_check_timeout: Duration,
pub enabled: bool,
}Expand description
Proxy rotation configuration
Fields§
§failure_threshold: usizeNumber of failures before marking a proxy as unhealthy
backoff_duration: DurationBackoff duration before retrying a failed proxy
max_backoff_duration: DurationMaximum backoff duration
health_check_interval: DurationHealth check interval
health_check_timeout: DurationHealth check timeout
enabled: boolEnable automatic rotation
Implementations§
Source§impl RotationConfig
impl RotationConfig
Sourcepub fn failure_threshold(self, threshold: usize) -> Self
pub fn failure_threshold(self, threshold: usize) -> Self
Set the failure threshold
Sourcepub fn backoff_duration(self, duration: Duration) -> Self
pub fn backoff_duration(self, duration: Duration) -> Self
Set the backoff duration
Sourcepub fn max_backoff_duration(self, duration: Duration) -> Self
pub fn max_backoff_duration(self, duration: Duration) -> Self
Set the maximum backoff duration
Sourcepub fn health_check_interval(self, interval: Duration) -> Self
pub fn health_check_interval(self, interval: Duration) -> Self
Set the health check interval
Sourcepub fn health_check_timeout(self, timeout: Duration) -> Self
pub fn health_check_timeout(self, timeout: Duration) -> Self
Set the health check timeout
Trait Implementations§
Source§impl Clone for RotationConfig
impl Clone for RotationConfig
Source§fn clone(&self) -> RotationConfig
fn clone(&self) -> RotationConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RotationConfig
impl Debug for RotationConfig
Source§impl Default for RotationConfig
impl Default for RotationConfig
Source§impl<'de> Deserialize<'de> for RotationConfig
impl<'de> Deserialize<'de> for RotationConfig
Source§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 Freeze for RotationConfig
impl RefUnwindSafe for RotationConfig
impl Send for RotationConfig
impl Sync for RotationConfig
impl Unpin for RotationConfig
impl UnwindSafe for RotationConfig
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