pub enum DurabilityTier {
None,
Snapshot,
Dedup,
Stream,
}Expand description
A workload’s declared durability tier — where a second copy of its state lives, and how far behind that copy is allowed to be (R850-P4).
The three non-None variants name turso-backup’s three implemented
tiers. They are spelled here rather than imported because workload-spec
is a leaf crate every fleet node links and turso-backup is a service-side
dependency; the coupling that matters is the vocabulary, not the types.
Variants§
None
Deliberately no second copy. State lives only where the container runs
and is gone when that node is. Legitimate for caches and scratch — and
it is a statement, which is why it is not the same as declaring
nothing (see WorkloadSpec::durability).
Snapshot
turso-backup tier 1a — periodic full VACUUM INTO snapshot to the
object store. Recovery point is the last snapshot, so the loss window is
the snapshot interval, which this declaration does not carry: a
snapshot-tier workload’s RPO is whatever schedules it.
Dedup
turso-backup tier 1b — incremental page-dedup snapshot. Same recovery
point semantics as Self::Snapshot; cheaper per run, so in practice
a shorter interval.
Stream
turso-backup tier 2 — WAL-frame streaming with restore by frame
replay. The only tier with a bounded, declarable loss window; see
WorkloadSpec::durability’s rpo-seconds and
turso_backup::stream::DEFAULT_RPO_TARGET (120 s), which is what an
undeclared RPO means in practice.
Implementations§
Trait Implementations§
Source§impl Clone for DurabilityTier
impl Clone for DurabilityTier
Source§fn clone(&self) -> DurabilityTier
fn clone(&self) -> DurabilityTier
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DurabilityTier
Source§impl Debug for DurabilityTier
impl Debug for DurabilityTier
Source§impl<'de> Deserialize<'de> for DurabilityTier
impl<'de> Deserialize<'de> for DurabilityTier
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>,
Source§impl Display for DurabilityTier
impl Display for DurabilityTier
impl Eq for DurabilityTier
Source§impl PartialEq for DurabilityTier
impl PartialEq for DurabilityTier
Source§impl Serialize for DurabilityTier
impl Serialize for DurabilityTier
impl StructuralPartialEq for DurabilityTier
Auto Trait Implementations§
impl Freeze for DurabilityTier
impl RefUnwindSafe for DurabilityTier
impl Send for DurabilityTier
impl Sync for DurabilityTier
impl Unpin for DurabilityTier
impl UnsafeUnpin for DurabilityTier
impl UnwindSafe for DurabilityTier
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.