Skip to main content

ClientOptions

Type Alias ClientOptions 

Source
pub type ClientOptions = Options;
Expand description

Alias of Options.

Aliased Type§

pub struct ClientOptions {
    pub pool_size: usize,
    pub client_name: String,
    pub logger: Option<Arc<dyn Fn(&str) + Send + Sync>>,
    pub call_timeout: Duration,
    pub max_inflight: usize,
}

Fields§

§pool_size: usize

Number of connections. Calls on different files can run in parallel up to this number.

§client_name: String§logger: Option<Arc<dyn Fn(&str) + Send + Sync>>

Receives log lines: events nobody listens for, listener panics and dropped events. The line has no prefix and no newline. When None, lines go to stderr with the prefix “mountos: “. Pass your own function to route them elsewhere.

§call_timeout: Duration

Longest a single request may take, from the end of the send to the reply. Duration::ZERO (the default) means no limit. A call that runs over fails with Error::Timeout. When the connection pipelines, only that call fails: its id is marked abandoned and the late reply is dropped. Otherwise, or when too many ids are abandoned, the connection is dropped and dialed again on the next call, and its files and watches are gone. A call that sends several requests (a large read or write) gets the limit for each request.

§max_inflight: usize

Most requests outstanding on one connection when the server pipelines. The server limit (max_inflight in its Hello reply) also applies. Values are held between 1 and 1024. A server without the pipelining capability gets one request at a time.