pub struct InMemoryCheckpointStore { /* private fields */ }Expand description
In-memory checkpoint store for testing and lightweight use.
Implementations§
Source§impl InMemoryCheckpointStore
impl InMemoryCheckpointStore
Sourcepub async fn summarize_run(&self, run_id: &str) -> Option<RunSummary>
pub async fn summarize_run(&self, run_id: &str) -> Option<RunSummary>
Build a RunSummary for the given run.
Trait Implementations§
Source§impl CheckpointStore for InMemoryCheckpointStore
impl CheckpointStore for InMemoryCheckpointStore
Source§fn create_run(
&self,
graph_name: &str,
) -> Pin<Box<dyn Future<Output = Result<RunId>> + Send + '_>>
fn create_run( &self, graph_name: &str, ) -> Pin<Box<dyn Future<Output = Result<RunId>> + Send + '_>>
Create a new run and return its ID.
Source§fn record_attempt(
&self,
run_id: &str,
node_id: &str,
attempt: u32,
input: &Value,
) -> Pin<Box<dyn Future<Output = Result<CheckpointAttemptId>> + Send + '_>>
fn record_attempt( &self, run_id: &str, node_id: &str, attempt: u32, input: &Value, ) -> Pin<Box<dyn Future<Output = Result<CheckpointAttemptId>> + Send + '_>>
Record a new node attempt (status: Running).
Source§fn complete_attempt(
&self,
attempt_id: &str,
output: &Value,
meta: &HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
fn complete_attempt( &self, attempt_id: &str, output: &Value, meta: &HashMap<String, Value>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
Mark an attempt as completed with output.
Source§fn fail_attempt(
&self,
attempt_id: &str,
error: &str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
fn fail_attempt( &self, attempt_id: &str, error: &str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
Mark an attempt as failed.
Source§fn record_interrupt(
&self,
attempt_id: &str,
interrupt: &Interrupt,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
fn record_interrupt( &self, attempt_id: &str, interrupt: &Interrupt, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
Record an interrupt on an attempt.
Source§fn save_state_snapshot(
&self,
run_id: &str,
state: &HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
fn save_state_snapshot( &self, run_id: &str, state: &HashMap<String, Value>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
Save the current state snapshot for a run.
Source§fn load_run(
&self,
run_id: &str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunState>>> + Send + '_>>
fn load_run( &self, run_id: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<RunState>>> + Send + '_>>
Load the full run state (for resume).
Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryCheckpointStore
impl !UnwindSafe for InMemoryCheckpointStore
impl Freeze for InMemoryCheckpointStore
impl Send for InMemoryCheckpointStore
impl Sync for InMemoryCheckpointStore
impl Unpin for InMemoryCheckpointStore
impl UnsafeUnpin for InMemoryCheckpointStore
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