pub struct RollbackManager { /* private fields */ }Expand description
Main rollback manager
Implementations§
Source§impl RollbackManager
impl RollbackManager
Sourcepub async fn new(config: RollbackConfig) -> RragResult<Self>
pub async fn new(config: RollbackConfig) -> RragResult<Self>
Create new rollback manager
Sourcepub async fn log_operation(
&self,
operation: IndexUpdate,
result: Option<UpdateResult>,
pre_state_hash: String,
post_state_hash: Option<String>,
) -> RragResult<()>
pub async fn log_operation( &self, operation: IndexUpdate, result: Option<UpdateResult>, pre_state_hash: String, post_state_hash: Option<String>, ) -> RragResult<()>
Log an operation for potential rollback
Sourcepub async fn create_snapshot(&self, _description: String) -> RragResult<String>
pub async fn create_snapshot(&self, _description: String) -> RragResult<String>
Create a system state snapshot
Sourcepub async fn create_rollback_point(
&self,
description: String,
operation_ids: Vec<String>,
auto_eligible: bool,
) -> RragResult<String>
pub async fn create_rollback_point( &self, description: String, operation_ids: Vec<String>, auto_eligible: bool, ) -> RragResult<String>
Create a rollback point
Sourcepub async fn rollback(
&self,
rollback_op: RollbackOperation,
) -> RragResult<RecoveryResult>
pub async fn rollback( &self, rollback_op: RollbackOperation, ) -> RragResult<RecoveryResult>
Perform rollback operation
Sourcepub async fn get_stats(&self) -> RollbackStats
pub async fn get_stats(&self) -> RollbackStats
Get rollback statistics
Sourcepub async fn get_snapshots(&self) -> RragResult<Vec<SystemState>>
pub async fn get_snapshots(&self) -> RragResult<Vec<SystemState>>
Get available snapshots
Sourcepub async fn get_rollback_points(&self) -> RragResult<Vec<RollbackPoint>>
pub async fn get_rollback_points(&self) -> RragResult<Vec<RollbackPoint>>
Get rollback points
Sourcepub async fn health_check(&self) -> RragResult<bool>
pub async fn health_check(&self) -> RragResult<bool>
Health check
Auto Trait Implementations§
impl Freeze for RollbackManager
impl !RefUnwindSafe for RollbackManager
impl Send for RollbackManager
impl Sync for RollbackManager
impl Unpin for RollbackManager
impl !UnwindSafe for RollbackManager
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
Mutably borrows from an owned value. Read more