pub struct HttpClientConfig {
pub max_retries: u32,
pub max_wait: u64,
pub base_delay: u64,
pub timeout: u64,
pub connect_timeout: u64,
}Expand description
HTTP client configuration
Fields§
§max_retries: u32Maximum number of retries
max_wait: u64Maximum wait time between retries (seconds)
base_delay: u64Base delay for exponential backoff (seconds)
timeout: u64Request timeout (seconds)
connect_timeout: u64Connect timeout (seconds)
Implementations§
Source§impl HttpClientConfig
impl HttpClientConfig
Sourcepub fn create_client(&self) -> Result<Client>
pub fn create_client(&self) -> Result<Client>
Create HTTP client with configured timeouts
Sourcepub fn from_cli_and_env(timeout_flag: Option<u64>) -> Self
pub fn from_cli_and_env(timeout_flag: Option<u64>) -> Self
Create HTTP client config from CLI flags and environment variables Precedence: CLI flag > environment variable > default
Trait Implementations§
Source§impl Clone for HttpClientConfig
impl Clone for HttpClientConfig
Source§fn clone(&self) -> HttpClientConfig
fn clone(&self) -> HttpClientConfig
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 HttpClientConfig
impl Debug for HttpClientConfig
Auto Trait Implementations§
impl Freeze for HttpClientConfig
impl RefUnwindSafe for HttpClientConfig
impl Send for HttpClientConfig
impl Sync for HttpClientConfig
impl Unpin for HttpClientConfig
impl UnsafeUnpin for HttpClientConfig
impl UnwindSafe for HttpClientConfig
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