pub struct HostConfig { /* private fields */ }Expand description
Per-host configuration.
Each HostConfig initializes one dedicated proxy pool.
Implementations§
Source§impl HostConfig
impl HostConfig
Sourcepub fn builder(host: impl Into<String>) -> HostConfigBuilder
pub fn builder(host: impl Into<String>) -> HostConfigBuilder
Create a new builder.
Sourcepub fn health_check_interval(&self) -> Duration
pub fn health_check_interval(&self) -> Duration
Interval between health checks.
Sourcepub fn health_check_timeout(&self) -> Duration
pub fn health_check_timeout(&self) -> Duration
Timeout for health checks.
Sourcepub fn min_available_proxies(&self) -> usize
pub fn min_available_proxies(&self) -> usize
Minimum number of available proxies.
Sourcepub fn health_check_url(&self) -> &str
pub fn health_check_url(&self) -> &str
URL used for health checks.
Sourcepub fn retry_count(&self) -> usize
pub fn retry_count(&self) -> usize
Number of times to retry.
Sourcepub fn retry_strategy(&self) -> RetryStrategy
pub fn retry_strategy(&self) -> RetryStrategy
Retry strategy.
Sourcepub fn selection_strategy(&self) -> ProxySelectionStrategy
pub fn selection_strategy(&self) -> ProxySelectionStrategy
Selection strategy.
Sourcepub fn min_request_interval_ms(&self) -> u64
pub fn min_request_interval_ms(&self) -> u64
Minimum interval between requests on the same proxy instance.
Sourcepub fn body_classifier(&self) -> &Arc<dyn BodyClassifier>
pub fn body_classifier(&self) -> &Arc<dyn BodyClassifier>
Body classifier.
Sourcepub fn proxy_cooldown(&self) -> Duration
pub fn proxy_cooldown(&self) -> Duration
Cooldown duration after a proxy failure.
Sourcepub fn reliable_top_k(&self) -> usize
pub fn reliable_top_k(&self) -> usize
K value for TopKReliableRandom.
Trait Implementations§
Source§impl Clone for HostConfig
impl Clone for HostConfig
Source§fn clone(&self) -> HostConfig
fn clone(&self) -> HostConfig
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 moreAuto Trait Implementations§
impl Freeze for HostConfig
impl !RefUnwindSafe for HostConfig
impl Send for HostConfig
impl Sync for HostConfig
impl Unpin for HostConfig
impl UnsafeUnpin for HostConfig
impl !UnwindSafe for HostConfig
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