pub struct LocalFileEventStore { /* private fields */ }Expand description
JSONL-backed event store for local durable runs.
Each workflow run is stored as <root>/<run_id>.jsonl; every line is a full
FlowEventEnvelope. The store serializes appends inside this process, but
it does not provide cross-process locking. Use it for local development,
embedded Rust hosts, and crash/restart durability. An unterminated malformed
tail is treated as a torn append and truncated before the next write;
terminated or interior corruption remains an error. Use a database-backed
store for multi-writer deployments.
Implementations§
Source§impl LocalFileEventStore
impl LocalFileEventStore
pub fn new(root: impl Into<PathBuf>) -> Self
pub fn root(&self) -> &Path
Sourcepub async fn prune_terminal_runs_older_than(
&self,
terminal_before: DateTime<Utc>,
) -> Result<Vec<String>>
pub async fn prune_terminal_runs_older_than( &self, terminal_before: DateTime<Utc>, ) -> Result<Vec<String>>
Remove completed, failed, or cancelled local run histories whose terminal
event timestamp is strictly before terminal_before.
Suspended and running runs are never removed by this helper. Corrupt histories are returned as errors rather than deleted, so operators can inspect them before cleanup.
Trait Implementations§
Source§impl Clone for LocalFileEventStore
impl Clone for LocalFileEventStore
Source§fn clone(&self) -> LocalFileEventStore
fn clone(&self) -> LocalFileEventStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more