Skip to main content

minion_engine/events/
types.rs

1use chrono::{DateTime, Utc};
2use serde::{Deserialize, Serialize};
3
4/// All events that can be emitted by the engine
5#[derive(Debug, Clone, Serialize, Deserialize)]
6#[serde(tag = "event", rename_all = "snake_case")]
7pub enum Event {
8    StepStarted {
9        step_name: String,
10        step_type: String,
11        timestamp: DateTime<Utc>,
12    },
13    StepCompleted {
14        step_name: String,
15        step_type: String,
16        duration_ms: u64,
17        timestamp: DateTime<Utc>,
18    },
19    StepFailed {
20        step_name: String,
21        step_type: String,
22        error: String,
23        duration_ms: u64,
24        timestamp: DateTime<Utc>,
25    },
26    WorkflowStarted {
27        timestamp: DateTime<Utc>,
28    },
29    WorkflowCompleted {
30        duration_ms: u64,
31        timestamp: DateTime<Utc>,
32    },
33    SandboxCreated {
34        sandbox_id: String,
35        timestamp: DateTime<Utc>,
36    },
37    SandboxDestroyed {
38        sandbox_id: String,
39        timestamp: DateTime<Utc>,
40    },
41}