pub struct BackupExecutionJournal {
pub journal_version: u16,
pub plan_id: String,
pub run_id: String,
pub preflight_id: Option<String>,
pub preflight_accepted: bool,
pub restart_required: bool,
pub operations: Vec<BackupExecutionJournalOperation>,
pub operation_receipts: Vec<BackupExecutionOperationReceipt>,
}Expand description
BackupExecutionJournal
Durable execution journal for one backup plan run. Owned by backup execution and persisted for resume and integrity checks.
Fields§
§journal_version: u16§plan_id: String§run_id: String§preflight_id: Option<String>§preflight_accepted: bool§restart_required: bool§operations: Vec<BackupExecutionJournalOperation>§operation_receipts: Vec<BackupExecutionOperationReceipt>Implementations§
Source§impl BackupExecutionJournal
impl BackupExecutionJournal
Sourcepub fn from_plan(plan: &BackupPlan) -> Result<Self, BackupExecutionJournalError>
pub fn from_plan(plan: &BackupPlan) -> Result<Self, BackupExecutionJournalError>
Build an execution journal from a validated backup plan.
Sourcepub fn validate(&self) -> Result<(), BackupExecutionJournalError>
pub fn validate(&self) -> Result<(), BackupExecutionJournalError>
Validate journal structure and operation receipts.
Sourcepub fn accept_preflight_bundle_at(
&mut self,
preflight_id: String,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn accept_preflight_bundle_at( &mut self, preflight_id: String, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Mark all preflight operations completed and unblock mutating operations.
Sourcepub fn accept_preflight_receipts_at(
&mut self,
receipts: &BackupExecutionPreflightReceipts,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn accept_preflight_receipts_at( &mut self, receipts: &BackupExecutionPreflightReceipts, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Accept a typed preflight receipt bundle and unblock mutating operations.
Sourcepub fn next_ready_operation(&self) -> Option<&BackupExecutionJournalOperation>
pub fn next_ready_operation(&self) -> Option<&BackupExecutionJournalOperation>
Return the next operation that should control runner progress.
Sourcepub fn mark_next_operation_pending_at(
&mut self,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn mark_next_operation_pending_at( &mut self, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Mark the next transitionable operation pending.
Sourcepub fn mark_operation_pending_at(
&mut self,
sequence: usize,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn mark_operation_pending_at( &mut self, sequence: usize, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Mark one operation pending.
Sourcepub fn mark_snapshot_create_pending_at(
&mut self,
sequence: usize,
updated_at: Option<String>,
snapshot_ids_before: Vec<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn mark_snapshot_create_pending_at( &mut self, sequence: usize, updated_at: Option<String>, snapshot_ids_before: Vec<String>, ) -> Result<(), BackupExecutionJournalError>
Mark one snapshot-create operation pending with its exact pre-effect inventory.
Sourcepub fn record_operation_receipt(
&mut self,
receipt: BackupExecutionOperationReceipt,
) -> Result<(), BackupExecutionJournalError>
pub fn record_operation_receipt( &mut self, receipt: BackupExecutionOperationReceipt, ) -> Result<(), BackupExecutionJournalError>
Record one operation receipt and transition the matching operation.
Sourcepub fn retry_failed_operation_at(
&mut self,
sequence: usize,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn retry_failed_operation_at( &mut self, sequence: usize, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Move a failed operation back to ready for retry.
Sourcepub fn resume_summary(&self) -> BackupExecutionResumeSummary
pub fn resume_summary(&self) -> BackupExecutionResumeSummary
Build a compact resumability summary.
Trait Implementations§
Source§impl Clone for BackupExecutionJournal
impl Clone for BackupExecutionJournal
Source§fn clone(&self) -> BackupExecutionJournal
fn clone(&self) -> BackupExecutionJournal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more