pub trait PostgresClientKnobs:
Debug
+ Send
+ Sync {
// Required methods
fn connection_pool_max_size(&self) -> usize;
fn connection_pool_max_wait(&self) -> Option<Duration>;
fn connection_pool_ttl(&self) -> Duration;
fn connection_pool_ttl_stagger(&self) -> Duration;
fn connect_timeout(&self) -> Duration;
fn tcp_user_timeout(&self) -> Duration;
}
Expand description
Configuration knobs for PostgresClient.
Required Methods§
sourcefn connection_pool_max_size(&self) -> usize
fn connection_pool_max_size(&self) -> usize
Maximum number of connections allowed in a pool.
sourcefn connection_pool_max_wait(&self) -> Option<Duration>
fn connection_pool_max_wait(&self) -> Option<Duration>
The maximum time to wait to obtain a connection, if any.
sourcefn connection_pool_ttl(&self) -> Duration
fn connection_pool_ttl(&self) -> Duration
Minimum TTL of a connection. It is expected that connections are routinely culled to balance load to the backing store.
sourcefn connection_pool_ttl_stagger(&self) -> Duration
fn connection_pool_ttl_stagger(&self) -> Duration
Minimum time between TTLing connections. Helps stagger reconnections to avoid stampeding the backing store.
sourcefn connect_timeout(&self) -> Duration
fn connect_timeout(&self) -> Duration
Time to wait for a connection to be made before trying.
sourcefn tcp_user_timeout(&self) -> Duration
fn tcp_user_timeout(&self) -> Duration
TCP user timeout for connection attempts.