1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! # ironflow-store
//!
//! Storage abstraction for the **ironflow** workflow engine. This crate provides
//! the [`RunStore`](store::RunStore) trait and data entities for persisting workflow
//! runs and steps.
//!
//! # Implementations
//!
//! | Store | Feature | Description |
//! |-------|---------|-------------|
//! | [`InMemoryStore`](memory::InMemoryStore) | `store-memory` (default) | In-process, no external dependencies. |
//! | [`PostgresStore`](postgres::PostgresStore) | `store-postgres` | Production-ready with `SELECT FOR UPDATE SKIP LOCKED`. |
//!
//! # Quick start
//!
//! ```no_run
//! use ironflow_store::prelude::*;
//! use serde_json::json;
//!
//! # async fn example() -> Result<(), ironflow_store::error::StoreError> {
//! let store = InMemoryStore::new();
//!
//! let run = store.create_run(NewRun {
//! workflow_name: "deploy".to_string(),
//! trigger: TriggerKind::Manual,
//! payload: json!({}),
//! max_retries: 3,
//! }).await?;
//!
//! println!("Run {} is {:?}", run.id, run.status);
//! # Ok(())
//! # }
//! ```
/// Backward-compatible alias — prefer `entities` for new code.
pub use entities as models;
/// Convenience re-exports for common usage.