pub struct HttpClientConfig
pub bypass_ssl_cert_check: bool,
pub trust_store: Option<Arc<TrustStore>>,
pub connect_timeout: Option<Duration>,
pub request_timeout: Option<Duration>,
pub max_connections_per_host: usize,
pub max_total_connections: usize,
pub connection_request_timeout: Duration,
pub max_retries: usize,
pub tcp_keep_alive: bool,
pub tcp_keep_idle: u32,
pub tcp_keep_interval: u32,
pub tcp_keep_count: u32,
pub connection_time_to_live: Duration,
Connection settings for a HyperClient.
HttpClientConfig::from_options derives them from KineticaOptions.
Fields
bypass_ssl_cert_check: boolAccept any server certificate. See [AcceptAnyServerCert] for what this gives up.
trust_store: Option<Arc<TrustStore>>The trust store to trust servers by, in place of the system’s roots
connect_timeout: Option<Duration>Limit on establishing a connection; None waits indefinitely.
request_timeout: Option<Duration>Read timeout: the limit on the wait for a response once the request has been sent, and then on each read of its body; the upload is not limited. None waits indefinitely.
max_connections_per_host: usizeMost requests in flight to one host at a time; also the number of idle connections kept per host for reuse. At least 1.
max_total_connections: usizeMost requests in flight across all hosts at a time. At least 1.
connection_request_timeout: DurationHow long a request waits for a free connection when a limit above is reached, before failing as a connection error.
max_retries: usizeHow many times an API request is retried, at once and on the same server: when sending it fails without a response (the connection is refused, reset or closed, the host is unknown, or no response arrives within the timeout), or the response is a 502 or 503. A connect timeout, a TLS failure or a failure reading the response body is not retried, and neither are health checks.
tcp_keep_alive: boolWhether connections send TCP keep-alive probes: on by default with the operating system’s timings.
tcp_keep_idle: u32Seconds a connection idles before the first probe; 0 keeps the system’s.
tcp_keep_interval: u32Seconds between probes; 0 keeps the system’s.
tcp_keep_count: u32Probes before the connection is dropped; 0 keeps the system’s.
connection_time_to_live: DurationHow long after its opening a connection may be reused: CONNECTION_TIME_TO_LIVE, one minute, by default.
Implementations
pub fn from_options(options: &KineticaOptions) -> Self
Takes the connection settings from options:
server_connection_timeoutis the connect timeout,timeoutis the request timeout,max_connections_per_hostandmax_total_connectionscap the requests in flight.
A timeout of 0 means no limit. A connection limit below 1, which Kinetica refuses, is raised to 1 here for a configuration built some other way.
Trait Implementations
impl Clone for HttpClientConfig
fn clone(&self) -> HttpClientConfig
fn clone_from(&mut self, source: &Self)
source. Read more