pub trait CheckpointStorage: Send + Sync {
// Required methods
fn store(&self, checkpoint: &TemporalCheckpoint) -> Result<()>;
fn get(&self, id: CheckpointId) -> Result<TemporalCheckpoint>;
fn get_latest(
&self,
session_id: SessionId,
) -> Result<Option<TemporalCheckpoint>>;
fn list_by_session(
&self,
session_id: SessionId,
) -> Result<Vec<CheckpointSummary>>;
fn list_by_tag(&self, tag: &str) -> Result<Vec<CheckpointSummary>>;
fn delete(&self, id: CheckpointId) -> Result<()>;
fn next_sequence(&self, session_id: SessionId) -> Result<u64>;
fn get_max_sequence(&self) -> Result<u64>;
}Expand description
Storage backend trait for checkpoints
Thread-safe version requires Send + Sync
Required Methods§
Sourcefn store(&self, checkpoint: &TemporalCheckpoint) -> Result<()>
fn store(&self, checkpoint: &TemporalCheckpoint) -> Result<()>
Store a checkpoint
Sourcefn get(&self, id: CheckpointId) -> Result<TemporalCheckpoint>
fn get(&self, id: CheckpointId) -> Result<TemporalCheckpoint>
Retrieve a checkpoint by ID
Sourcefn get_latest(
&self,
session_id: SessionId,
) -> Result<Option<TemporalCheckpoint>>
fn get_latest( &self, session_id: SessionId, ) -> Result<Option<TemporalCheckpoint>>
Get the latest checkpoint for a session
Sourcefn list_by_session(
&self,
session_id: SessionId,
) -> Result<Vec<CheckpointSummary>>
fn list_by_session( &self, session_id: SessionId, ) -> Result<Vec<CheckpointSummary>>
List all checkpoints for a session
Sourcefn list_by_tag(&self, tag: &str) -> Result<Vec<CheckpointSummary>>
fn list_by_tag(&self, tag: &str) -> Result<Vec<CheckpointSummary>>
List checkpoints with a specific tag
Sourcefn delete(&self, id: CheckpointId) -> Result<()>
fn delete(&self, id: CheckpointId) -> Result<()>
Delete a checkpoint
Sourcefn next_sequence(&self, session_id: SessionId) -> Result<u64>
fn next_sequence(&self, session_id: SessionId) -> Result<u64>
Get the next sequence number for a session
Sourcefn get_max_sequence(&self) -> Result<u64>
fn get_max_sequence(&self) -> Result<u64>
Get the maximum sequence number across all checkpoints