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.