pub struct EpochConfig {
pub target_duration: Time,
pub min_duration: Time,
pub max_duration: Time,
pub grace_period: Time,
pub retention_epochs: u32,
pub require_quorum: bool,
pub quorum_size: u32,
}Expand description
Configuration for epoch behavior.
Fields§
§target_duration: TimeTarget duration for each epoch.
min_duration: TimeMinimum duration before epoch transition is allowed.
max_duration: TimeMaximum duration before forced epoch transition.
grace_period: TimeGrace period after epoch end before resources are reclaimed.
retention_epochs: u32Number of epochs to retain for historical queries.
require_quorum: boolWhether to require quorum for epoch transitions.
quorum_size: u32Quorum size for epoch transitions (if required).
Implementations§
Source§impl EpochConfig
impl EpochConfig
Sourcepub fn short_lived() -> Self
pub fn short_lived() -> Self
Creates a config for short-lived epochs (testing).
Sourcepub fn long_lived() -> Self
pub fn long_lived() -> Self
Creates a config for long-lived epochs (production).
Trait Implementations§
Source§impl Clone for EpochConfig
impl Clone for EpochConfig
Source§fn clone(&self) -> EpochConfig
fn clone(&self) -> EpochConfig
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 moreSource§impl Debug for EpochConfig
impl Debug for EpochConfig
Auto Trait Implementations§
impl Freeze for EpochConfig
impl RefUnwindSafe for EpochConfig
impl Send for EpochConfig
impl Sync for EpochConfig
impl Unpin for EpochConfig
impl UnwindSafe for EpochConfig
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).