pub struct SessionConfig {
    pub max_opened: usize,
    pub min_opened: usize,
    pub max_idle: usize,
    pub idle_timeout: Duration,
    pub session_alive_trust_duration: Duration,
    pub session_get_timeout: Duration,
    pub refresh_interval: Duration,
    /* private fields */
}

Fields§

§max_opened: usize

max_opened is the maximum number of opened sessions allowed by the session pool. If the client tries to open a session and there are already max_opened sessions, it will block until one becomes available or the context passed to the client method is canceled or times out.

§min_opened: usize

min_opened is the minimum number of opened sessions that the session pool tries to maintain. Session pool won’t continue to expire sessions if number of opened connections drops below min_opened. However, if a session is found to be broken, it will still be evicted from the session pool, therefore it is posssible that the number of opened sessions drops below min_opened.

§max_idle: usize

max_idle is the maximum number of idle sessions, pool is allowed to keep.

§idle_timeout: Duration

idle_timeout is the wait time before discarding an idle session. Sessions older than this value since they were last used will be discarded. However, if the number of sessions is less than or equal to min_opened, it will not be discarded.

§session_alive_trust_duration: Duration§session_get_timeout: Duration

session_get_timeout is the maximum value of the waiting time that occurs when retrieving from the connection pool when there is no idle session.

§refresh_interval: Duration

refresh_interval is the interval of cleanup and health check functions.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Converts to this type from a reference to the input type.
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more