pub struct ClusterConfig {
pub connection_timeout: u64,
pub election_timeout: u64,
pub update_interval: u64,
pub max_node: NonZeroUsize,
pub min_node: NonZeroUsize,
}
Expand description
Set cluster configurations
Fields§
§connection_timeout: u64
connection timeout in milliseconds between cluster nodes
election_timeout: u64
Approximate interval in milliseconds between attempts to elect new leader node. Application will use a randomly chosen value between election_timeout and election_timeout*2
update_interval: u64
Interval between discovery service call, in milliseconds
max_node: NonZeroUsize
maximum number of allowed node in a cluster
min_node: NonZeroUsize
minimum number of nodes required to create a cluster
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClusterConfig
impl RefUnwindSafe for ClusterConfig
impl Send for ClusterConfig
impl Sync for ClusterConfig
impl Unpin for ClusterConfig
impl UnwindSafe for ClusterConfig
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