pub struct Server {
pub host: HostName,
pub port: Port,
pub name: ServerName,
pub username: Option<String>,
pub password: Option<String>,
pub max_connections: MaxConnections,
pub use_tls: bool,
pub tls_verify_cert: bool,
pub tls_cert_path: Option<String>,
pub connection_keepalive: Option<Duration>,
pub health_check_max_per_cycle: usize,
pub health_check_pool_timeout: Duration,
}Expand description
Configuration for a single backend server
Fields§
§host: HostName§port: Port§name: ServerName§username: Option<String>§password: Option<String>§max_connections: MaxConnectionsMaximum number of concurrent connections to this server
use_tls: boolEnable TLS/SSL for this backend connection
tls_verify_cert: boolVerify TLS certificates (recommended for production)
tls_cert_path: Option<String>Optional path to custom CA certificate
connection_keepalive: Option<Duration>Interval to send keep-alive commands (DATE) on idle connections None disables keep-alive (default)
health_check_max_per_cycle: usizeMaximum number of connections to check per health check cycle Lower values reduce pool contention but may take longer to detect all stale connections
health_check_pool_timeout: DurationTimeout when acquiring a connection for health checking Short timeout prevents blocking if pool is busy
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Server
impl<'de> Deserialize<'de> for Server
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Server
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more