pub struct ConnectionPoolConfig {
pub endpoints: Vec<String>,
pub load_balancer: LoadBalancer,
pub health_check_interval: Duration,
pub failure_threshold: usize,
pub recovery_threshold: usize,
pub base_config: Option<TalosClientConfig>,
pub auto_health_check: bool,
}Expand description
Configuration for the connection pool.
Fields§
§endpoints: Vec<String>List of endpoint URLs.
load_balancer: LoadBalancerLoad balancing strategy.
health_check_interval: DurationHealth check interval.
failure_threshold: usizeNumber of consecutive failures before marking unhealthy.
recovery_threshold: usizeNumber of consecutive successes before marking healthy again.
base_config: Option<TalosClientConfig>Base client configuration (TLS, timeouts, etc.).
auto_health_check: boolEnable automatic health checks.
Implementations§
Source§impl ConnectionPoolConfig
impl ConnectionPoolConfig
Sourcepub fn with_load_balancer(self, lb: LoadBalancer) -> Self
pub fn with_load_balancer(self, lb: LoadBalancer) -> Self
Set the load balancing strategy.
Sourcepub fn with_health_check_interval(self, interval: Duration) -> Self
pub fn with_health_check_interval(self, interval: Duration) -> Self
Set the health check interval.
Sourcepub fn with_failure_threshold(self, threshold: usize) -> Self
pub fn with_failure_threshold(self, threshold: usize) -> Self
Set the failure threshold.
Sourcepub fn with_recovery_threshold(self, threshold: usize) -> Self
pub fn with_recovery_threshold(self, threshold: usize) -> Self
Set the recovery threshold.
Sourcepub fn with_base_config(self, config: TalosClientConfig) -> Self
pub fn with_base_config(self, config: TalosClientConfig) -> Self
Set the base client configuration.
Sourcepub fn disable_auto_health_check(self) -> Self
pub fn disable_auto_health_check(self) -> Self
Disable automatic health checks.
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 moreAuto 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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request