pub struct ConnectionPoolConfig {
pub min_connections: usize,
pub max_connections: usize,
pub idle_timeout: Duration,
pub connect_timeout: Duration,
pub health_check_interval: Duration,
}Expand description
Connection pool configuration
Fields§
§min_connections: usizeMinimum connections to maintain (default: 1)
max_connections: usizeMaximum connections allowed (default: 1 for backward compatibility)
idle_timeout: DurationIdle timeout before closing excess connections (default: 60s)
connect_timeout: DurationConnection timeout (default: 5s)
health_check_interval: DurationHealth check interval (default: 10s)
Implementations§
Source§impl ConnectionPoolConfig
impl ConnectionPoolConfig
Sourcepub fn for_gateway() -> Self
pub fn for_gateway() -> Self
Configuration optimized for gateway scenarios
Sourcepub fn with_pool_size(min: usize, max: usize) -> Self
pub fn with_pool_size(min: usize, max: usize) -> Self
Create configuration with specific pool size
Trait Implementations§
Source§impl Clone for ConnectionPoolConfig
impl Clone for ConnectionPoolConfig
Source§fn clone(&self) -> ConnectionPoolConfig
fn clone(&self) -> ConnectionPoolConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectionPoolConfig
impl Debug for ConnectionPoolConfig
Auto Trait Implementations§
impl Freeze for ConnectionPoolConfig
impl RefUnwindSafe for ConnectionPoolConfig
impl Send for ConnectionPoolConfig
impl Sync for ConnectionPoolConfig
impl Unpin for ConnectionPoolConfig
impl UnwindSafe for ConnectionPoolConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more