Struct ConnectionPoolOptions

Source
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>,
}
Expand description

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§

Source§

impl Debug for ConnectionPoolOptions

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,