[][src]Struct cueball::connection_pool::types::ConnectionPoolOptions

pub struct ConnectionPoolOptions {
    pub max_connections: Option<u32>,
    pub claim_timeout: Option<u64>,
    pub log: Option<Logger>,
    pub rebalancer_action_delay: Option<u64>,
    pub decoherence_interval: Option<u64>,
    pub connection_check_interval: Option<u64>,
}

The configuration options for a Cueball connection pool. This is required to instantiate a new connection pool.

Fields

max_connections: Option<u32>

An optional maximum number of connections to maintain in the connection pool. If not specified the default is 10.

claim_timeout: Option<u64>

An optional timeout for blocking calls (claim) to request a connection from the pool. If not specified the calls will block indefinitely.

log: Option<Logger>

An optional slog logger instance. If none is provided then the logging will fall back to using the slog-stdlog drain which is essentially the same as using the rust standard log crate.

rebalancer_action_delay: Option<u64>

An optional delay time to avoid extra rebalancing work in case the resolver notifies the pool of multiple changes within a short period. The default is 100 milliseconds.

decoherence_interval: Option<u64>

Optional decoherence interval in seconds. This represents the length of the period of the decoherence shuffle. If not specified the default is 300 seconds.

connection_check_interval: Option<u64>

Optional connection check interval in seconds. This represents the length of the period of the pool connection check task. If not specified the default is 30 seconds.

Trait Implementations

impl Debug for ConnectionPoolOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,