Struct paxakos::heartbeats::StaticConfig
source · pub struct StaticConfig<N, A> { /* private fields */ }
Expand description
A static configuration.
Implementations
sourceimpl<N, A> StaticConfig<N, A>where
N: Node,
A: ApplicableTo<StateOf<N>> + Default + 'static,
impl<N, A> StaticConfig<N, A>where
N: Node,
A: ApplicableTo<StateOf<N>> + Default + 'static,
sourcepub fn with_interval(interval: Duration) -> Self
pub fn with_interval(interval: Duration) -> Self
Constructs a new configuratin with the given interval.
sourcepub fn when_leading(self, leader_interval: Duration) -> Self
pub fn when_leading(self, leader_interval: Duration) -> Self
Sets the interval at which leader nodes send heartbeats.
Trait Implementations
sourceimpl<N, A> Config for StaticConfig<N, A>where
N: Node,
A: ApplicableTo<StateOf<N>> + Default + 'static,
impl<N, A> Config for StaticConfig<N, A>where
N: Node,
A: ApplicableTo<StateOf<N>> + Default + 'static,
type Node = N
type Node = N
The node type that is decorated.
type Applicable = A
type Applicable = A
The applicable that is used to fill gaps, usually a no-op.
type RetryPolicy = DoNotRetry<<N as Node>::Invocation>
type RetryPolicy = DoNotRetry<<N as Node>::Invocation>
Type of retry policy to be used. Read more
sourcefn leader_interval(&self) -> Option<Duration>
fn leader_interval(&self) -> Option<Duration>
Interval at which leader nodes send heartbeats.
sourcefn new_heartbeat(&self) -> Self::Applicable
fn new_heartbeat(&self) -> Self::Applicable
Creates a new heartbeat value.
sourcefn retry_policy(&self) -> Self::RetryPolicy
fn retry_policy(&self) -> Self::RetryPolicy
Creates a retry policy. Read more
Auto Trait Implementations
impl<N, A> RefUnwindSafe for StaticConfig<N, A>where
A: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, A> Send for StaticConfig<N, A>where
A: Send,
N: Send,
impl<N, A> Sync for StaticConfig<N, A>where
A: Sync,
N: Sync,
impl<N, A> Unpin for StaticConfig<N, A>where
A: Unpin,
N: Unpin,
impl<N, A> UnwindSafe for StaticConfig<N, A>where
A: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more