Skip to main content
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: bool

Accept 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: usize

Most 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: usize

Most requests in flight across all hosts at a time. At least 1.

connection_request_timeout: Duration

How long a request waits for a free connection when a limit above is reached, before failing as a connection error.

max_retries: usize

How 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: bool

Whether connections send TCP keep-alive probes: on by default with the operating system’s timings.

tcp_keep_idle: u32

Seconds a connection idles before the first probe; 0 keeps the system’s.

tcp_keep_interval: u32

Seconds between probes; 0 keeps the system’s.

tcp_keep_count: u32

Probes before the connection is dropped; 0 keeps the system’s.

connection_time_to_live: Duration

How long after its opening a connection may be reused: CONNECTION_TIME_TO_LIVE, one minute, by default.

Implementations

Source

pub fn from_options(options: &KineticaOptions) -> Self

Takes the connection settings from options:

  • server_connection_timeout is the connect timeout,
  • timeout is the request timeout,
  • max_connections_per_host and max_total_connections cap 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

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source

fn fmt(&self, f: &mut Formatter<’_>) -> Result

Formats the value using the given formatter. Read more
Source

fn default() -> Self

Returns the “default value” for a type. Read more