Struct fred::types::ConnectionConfig
source · pub struct ConnectionConfig {Show 13 fields
pub connection_timeout: Duration,
pub internal_command_timeout: Duration,
pub cluster_cache_update_delay: Duration,
pub max_command_attempts: u32,
pub max_redirections: u32,
pub unresponsive: UnresponsiveConfig,
pub reconnect_on_auth_error: bool,
pub auto_client_setname: bool,
pub max_command_buffer_len: usize,
pub disable_cluster_health_check: bool,
pub replica: ReplicaConfig,
pub tcp: TcpConfig,
pub reconnect_errors: Vec<ReconnectError>,
}Expand description
Configuration options related to the creation or management of TCP connection.
Fields§
§connection_timeout: DurationThe timeout to apply when attempting to create a new TCP connection.
This also includes the TLS handshake if using any of the TLS features.
Default: 10 sec
internal_command_timeout: DurationThe timeout to apply when sending internal commands such as AUTH, SELECT, CLUSTER SLOTS, READONLY, etc.
Default: 10 sec
cluster_cache_update_delay: DurationThe amount of time to wait after a MOVED error is received before the client will update the cached cluster
state.
Default: 0
max_command_attempts: u32The maximum number of times the client will attempt to send a command.
This value be incremented whenever the connection closes while the command is in-flight.
Default: 3
max_redirections: u32The maximum number of times the client will attempt to follow a MOVED or ASK redirection per command.
Default: 5
unresponsive: UnresponsiveConfigUnresponsive connection configuration options.
reconnect_on_auth_error: boolAn unexpected NOAUTH error is treated the same as a general connection failure, causing the client to
reconnect based on the ReconnectPolicy. This is recommended if callers are using ElastiCache.
Default: false
auto_client_setname: boolAutomatically send CLIENT SETNAME on each connection associated with a client instance.
Default: false
max_command_buffer_len: usizeLimit the size of the internal in-memory command queue.
Commands that exceed this limit will receive a RedisErrorKind::Backpressure error.
See command_queue_len for more information.
Default: 0 (unlimited)
disable_cluster_health_check: boolDisable the CLUSTER INFO health check when initializing cluster connections.
Default: false
replica: ReplicaConfigreplicas only.Configuration options for replica nodes.
Default: None
tcp: TcpConfigTCP connection options.
reconnect_errors: Vec<ReconnectError>custom-reconnect-errors only.Trait Implementations§
source§impl Clone for ConnectionConfig
impl Clone for ConnectionConfig
source§fn clone(&self) -> ConnectionConfig
fn clone(&self) -> ConnectionConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ConnectionConfig
impl Debug for ConnectionConfig
source§impl Default for ConnectionConfig
impl Default for ConnectionConfig
source§impl PartialEq for ConnectionConfig
impl PartialEq for ConnectionConfig
source§fn eq(&self, other: &ConnectionConfig) -> bool
fn eq(&self, other: &ConnectionConfig) -> bool
self and other values to be equal, and is used
by ==.