pub struct SnapshotConfig {Show 18 fields
pub enable: bool,
pub max_log_entries_before_snapshot: u64,
pub snapshot_cool_down_since_last_check: Duration,
pub cleanup_retain_count: u64,
pub snapshots_dir: PathBuf,
pub chunk_size: usize,
pub retained_log_entries: u64,
pub sender_yield_every_n_chunks: usize,
pub receiver_yield_every_n_chunks: usize,
pub max_bandwidth_mbps: u32,
pub push_queue_size: usize,
pub cache_size: usize,
pub max_retries: u32,
pub transfer_timeout_in_sec: u64,
pub retry_interval_in_ms: u64,
pub snapshot_push_backoff_in_ms: u64,
pub snapshot_push_max_retry: u32,
pub push_timeout_in_ms: u64,
}
Expand description
Submit processor-specific configuration
Fields§
§enable: bool
If enable the snapshot or not
max_log_entries_before_snapshot: u64
Maximum number of log entries to accumulate before triggering snapshot creation This helps control memory usage by enforcing periodic state compaction
snapshot_cool_down_since_last_check: Duration
Minimum duration to wait between consecutive snapshot checks. Acts as a cooldown period to avoid overly frequent snapshot evaluations.
cleanup_retain_count: u64
Number of historical snapshot versions to retain during cleanup Ensures we maintain a safety buffer of previous states for recovery
snapshots_dir: PathBuf
Snapshot storage directory
Default: default_snapshots_dir()
(/tmp/snapshots)
chunk_size: usize
Size (in bytes) of individual chunks when transferring snapshots
Default: default_chunk_size()
(typically 1MB)
retained_log_entries: u64
Number of log entries to retain (0 = disable retention)
sender_yield_every_n_chunks: usize
Number of chunks to process before yielding the task
receiver_yield_every_n_chunks: usize
Number of chunks to process before yielding the task
max_bandwidth_mbps: u32
§push_queue_size: usize
§cache_size: usize
§max_retries: u32
§transfer_timeout_in_sec: u64
§retry_interval_in_ms: u64
§snapshot_push_backoff_in_ms: u64
§snapshot_push_max_retry: u32
§push_timeout_in_ms: u64
Trait Implementations§
Source§impl Clone for SnapshotConfig
impl Clone for SnapshotConfig
Source§fn clone(&self) -> SnapshotConfig
fn clone(&self) -> SnapshotConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SnapshotConfig
impl Debug for SnapshotConfig
Source§impl Default for SnapshotConfig
impl Default for SnapshotConfig
Source§impl<'de> Deserialize<'de> for SnapshotConfig
impl<'de> Deserialize<'de> for SnapshotConfig
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>,
Auto Trait Implementations§
impl Freeze for SnapshotConfig
impl RefUnwindSafe for SnapshotConfig
impl Send for SnapshotConfig
impl Sync for SnapshotConfig
impl Unpin for SnapshotConfig
impl UnwindSafe for SnapshotConfig
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,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request