Trait paxakos::heartbeats::Config [−][src]
pub trait Config {
type Node: Node;
type Applicable: ApplicableTo<StateOf<Self::Node>> + 'static;
fn interval(&self) -> Option<Duration>;
fn new_heartbeat(&self) -> Self::Applicable;
fn init(&mut self, node: &Self::Node) { ... }
fn update(&mut self, event: &EventFor<Self::Node>) { ... }
fn leader_interval(&self) -> Option<Duration> { ... }
}
Expand description
Heartbeats configuration.
Associated Types
type Applicable: ApplicableTo<StateOf<Self::Node>> + 'static
type Applicable: ApplicableTo<StateOf<Self::Node>> + 'static
The applicable that is used to fill gaps, usually a no-op.
Required methods
fn new_heartbeat(&self) -> Self::Applicable
fn new_heartbeat(&self) -> Self::Applicable
Creates a new heartbeat value.
Provided methods
Updates the configuration with the given event.
fn leader_interval(&self) -> Option<Duration>
fn leader_interval(&self) -> Option<Duration>
Interval at which leader nodes send heartbeats.