pub struct MasterComponentConfig {
pub drain_timeout_ms: u64,
pub reconnect: NetworkRetryPolicy,
pub delegate_retry_max_attempts: Option<u32>,
}Expand description
Configuration for the master/leader-election component.
Controls drain timeout for graceful delegate shutdown and reconnection policy.
§Backward compatibility
The delegate_retry_max_attempts field is retained as a backward-compat alias.
When set (not None), it bridges into reconnect.max_attempts during construction
in MasterComponent::new(). If reconnect is also explicitly configured, the
explicit reconnect value wins.
Fields§
§drain_timeout_ms: u64Timeout in milliseconds for draining a delegate consumer on leadership loss. The drain runs after leadership is lost and may overlap a successor’s lease; see the README “How It Works” section.
reconnect: NetworkRetryPolicyStructured reconnection policy, replacing the flat delegate_retry_max_attempts
field for new configs. Default: unlimited (max_attempts=0).
delegate_retry_max_attempts: Option<u32>Backward-compat alias for reconnect.max_attempts. None means unlimited.
Bridged into reconnect during MasterComponent::new().
Implementations§
Trait Implementations§
Source§impl Clone for MasterComponentConfig
impl Clone for MasterComponentConfig
Source§fn clone(&self) -> MasterComponentConfig
fn clone(&self) -> MasterComponentConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more