pub struct SnapshotConfig {
pub enabled: bool,
pub url: Option<String>,
pub interval: Duration,
pub keep: usize,
pub snapshot_on_shutdown: bool,
pub min_mutations: u64,
pub max_resume_age_slots: u64,
pub ready_max_lag_slots: u64,
pub ready_max_hold: Duration,
}Expand description
Configuration for state snapshots. Disabled by default; enable via
ServerBuilder::snapshots(...) or ARETE_SNAPSHOT_* env vars.
Fields§
§enabled: boolMaster opt-in.
url: Option<String>Where blobs live: file:///var/lib/arete/snapshots, a plain path, or
(with the snapshot-object-store feature) s3:///gs:///az://.
interval: DurationPeriodic snapshot cadence.
keep: usizeRetained snapshots; older ones are pruned after each write.
snapshot_on_shutdown: boolTake a final snapshot on SIGTERM/SIGINT before exit.
min_mutations: u64Skip a periodic cycle when fewer batches were applied since the last snapshot (quiet stacks snapshot rarely).
max_resume_age_slots: u64If the snapshot is older than this many (estimated) slots, hydrate state but start the stream live instead of resuming from the watermark.
ready_max_lag_slots: u64/ready stays 503 after a watermark resume until the projector is
within this many slots of the observed tip…
ready_max_hold: Duration…or until this much time has passed (guards quiet stacks, where the watermark never advances because nothing happens on-chain).
Implementations§
Trait Implementations§
Source§impl Clone for SnapshotConfig
impl Clone for SnapshotConfig
Source§fn clone(&self) -> SnapshotConfig
fn clone(&self) -> SnapshotConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more