CheckpointStorage

Trait CheckpointStorage 

Source
pub trait CheckpointStorage: Send + Sync {
    // Required methods
    fn save_checkpoint(
        &self,
        execution_id: ExecutionId,
        checkpoint: &ExecutionCheckpoint,
    ) -> Result<CheckpointId, CheckpointError>;
    fn load_latest_checkpoint(
        &self,
        execution_id: ExecutionId,
    ) -> Result<Option<ExecutionCheckpoint>, CheckpointError>;
    fn load_checkpoint(
        &self,
        checkpoint_id: CheckpointId,
    ) -> Result<Option<ExecutionCheckpoint>, CheckpointError>;
    fn list_checkpoints(
        &self,
        execution_id: ExecutionId,
    ) -> Result<Vec<CheckpointMetadata>, CheckpointError>;
    fn prune_checkpoints(
        &self,
        execution_id: ExecutionId,
        keep_count: usize,
    ) -> Result<usize, CheckpointError>;
    fn delete_checkpoints(
        &self,
        execution_id: ExecutionId,
    ) -> Result<usize, CheckpointError>;
}
Expand description

Storage abstraction for checkpoints

Required Methods§

Source

fn save_checkpoint( &self, execution_id: ExecutionId, checkpoint: &ExecutionCheckpoint, ) -> Result<CheckpointId, CheckpointError>

Save a checkpoint

Source

fn load_latest_checkpoint( &self, execution_id: ExecutionId, ) -> Result<Option<ExecutionCheckpoint>, CheckpointError>

Load the latest checkpoint for an execution

Source

fn load_checkpoint( &self, checkpoint_id: CheckpointId, ) -> Result<Option<ExecutionCheckpoint>, CheckpointError>

Load a specific checkpoint by ID

Source

fn list_checkpoints( &self, execution_id: ExecutionId, ) -> Result<Vec<CheckpointMetadata>, CheckpointError>

List all checkpoints for an execution

Source

fn prune_checkpoints( &self, execution_id: ExecutionId, keep_count: usize, ) -> Result<usize, CheckpointError>

Delete old checkpoints beyond retention limit

Source

fn delete_checkpoints( &self, execution_id: ExecutionId, ) -> Result<usize, CheckpointError>

Delete all checkpoints for an execution

Implementors§