pub trait ConsensusKnobs: Debug + Send + Sync {
    // Required methods
    fn connection_pool_max_size(&self) -> usize;
    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 Consensus.

Required Methods§

source

fn connection_pool_max_size(&self) -> usize

Maximum number of connections allowed in a pool.

source

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 of Consensus.

source

fn connection_pool_ttl_stagger(&self) -> Duration

Minimum time between TTLing connections. Helps stagger reconnections to avoid stampeding the backing store of Consensus.

source

fn connect_timeout(&self) -> Duration

Time to wait for a connection to be made before trying.

source

fn tcp_user_timeout(&self) -> Duration

TCP user timeout for connection to Consensus.

Implementors§