pub struct HostConfigBuilder { /* private fields */ }Expand description
Builder for HostConfig.
Implementations§
Source§impl HostConfigBuilder
impl HostConfigBuilder
Sourcepub fn health_check_interval(self, interval: Duration) -> Self
pub fn health_check_interval(self, interval: Duration) -> Self
Set the interval between health checks.
Sourcepub fn health_check_timeout(self, timeout: Duration) -> Self
pub fn health_check_timeout(self, timeout: Duration) -> Self
Set the timeout for health checks.
Sourcepub fn min_available_proxies(self, count: usize) -> Self
pub fn min_available_proxies(self, count: usize) -> Self
Set the minimum number of available proxies.
Sourcepub fn health_check_url(self, url: impl Into<String>) -> Self
pub fn health_check_url(self, url: impl Into<String>) -> Self
Set the URL used for health checks.
Sourcepub fn retry_count(self, count: usize) -> Self
pub fn retry_count(self, count: usize) -> Self
Set retry count.
Sourcepub fn retry_strategy(self, strategy: RetryStrategy) -> Self
pub fn retry_strategy(self, strategy: RetryStrategy) -> Self
Set retry strategy.
Sourcepub fn selection_strategy(self, strategy: ProxySelectionStrategy) -> Self
pub fn selection_strategy(self, strategy: ProxySelectionStrategy) -> Self
Set selection strategy.
Sourcepub fn min_request_interval_ms(self, interval_ms: u64) -> Self
pub fn min_request_interval_ms(self, interval_ms: u64) -> Self
Set minimum interval milliseconds between requests on one proxy instance.
Sourcepub fn body_classifier(self, classifier: impl BodyClassifier) -> Self
pub fn body_classifier(self, classifier: impl BodyClassifier) -> Self
Set custom body classifier.
Sourcepub fn proxy_cooldown(self, cooldown: Duration) -> Self
pub fn proxy_cooldown(self, cooldown: Duration) -> Self
Set cooldown duration after one failed request on a proxy.
Sourcepub fn reliable_top_k(self, top_k: usize) -> Self
pub fn reliable_top_k(self, top_k: usize) -> Self
Set K for TopKReliableRandom.
Sourcepub fn build(self) -> HostConfig
pub fn build(self) -> HostConfig
Build host config.
Auto Trait Implementations§
impl Freeze for HostConfigBuilder
impl !RefUnwindSafe for HostConfigBuilder
impl Send for HostConfigBuilder
impl Sync for HostConfigBuilder
impl Unpin for HostConfigBuilder
impl UnsafeUnpin for HostConfigBuilder
impl !UnwindSafe for HostConfigBuilder
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