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
//! The [`LogStore`] trait -- async storage abstraction for run/step log lines.
//!
//! Persists log output so it can be retrieved after the run finishes,
//! independently of whether an SSE client was connected at the time.
use Uuid;
use crate;
use crateStoreFuture;
/// Async storage abstraction for run/step log entries.
///
/// All methods return a [`StoreFuture`] (boxed future) for object safety,
/// allowing the store to be used as `Arc<dyn LogStore>`.
///
/// # Examples
///
/// ```no_run
/// use ironflow_store::prelude::*;
/// use uuid::Uuid;
///
/// # async fn example() -> Result<(), ironflow_store::error::StoreError> {
/// let store = InMemoryStore::new();
///
/// store.append_logs(NewLogEntries {
/// run_id: Uuid::now_v7(),
/// step_id: Uuid::now_v7(),
/// step_name: "build".to_string(),
/// stream: LogStream::Stdout,
/// lines: vec!["Compiling ironflow v0.1.0".to_string()],
/// }).await?;
/// # Ok(())
/// # }
/// ```