pub struct FtConfig {
pub model: Option<FtModel>,
pub checkpoint_interval: Option<Option<ConfigDuration>>,
}Expand description
Fault-tolerance configuration.
The default FtConfig (via FtConfig::default) disables fault tolerance, which is the configuration that one gets if RuntimeConfig omits fault tolerance configuration.
The default value for FtConfig::model enables fault tolerance, as
Some(FtModel::default()). This is the configuration that one gets if
RuntimeConfig includes a fault tolerance configuration but does not
specify a particular model.
Fields§
§model: Option<FtModel>Fault tolerance model to use.
checkpoint_interval: Option<Option<ConfigDuration>>Interval between automatic checkpoints, for example 60s.
Unset selects the default, DEFAULT_CHECKPOINT_INTERVAL; null
disables periodic checkpointing.
Values less than 1 second or greater than 1 hour will be forced into
that range.
Implementations§
Source§impl FtConfig
impl FtConfig
pub fn is_enabled(&self) -> bool
Sourcepub fn checkpoint_interval(&self) -> Option<Duration>
pub fn checkpoint_interval(&self) -> Option<Duration>
Returns the checkpoint interval, if fault tolerance is enabled, and
otherwise None.
Falls back to the deprecated checkpoint_interval_secs and then to
DEFAULT_CHECKPOINT_INTERVAL. The interval is clamped to between one
second and one hour.
Trait Implementations§
impl Copy for FtConfig
Source§impl<'de> Deserialize<'de> for FtConfig
impl<'de> Deserialize<'de> for FtConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for FtConfig
impl StructuralPartialEq for FtConfig
Auto Trait Implementations§
impl Freeze for FtConfig
impl RefUnwindSafe for FtConfig
impl Send for FtConfig
impl Sync for FtConfig
impl Unpin for FtConfig
impl UnsafeUnpin for FtConfig
impl UnwindSafe for FtConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more