fleetflow_container/
runtime.rs1use anyhow::Result;
2use fleetflow_atom::Flow;
3
4#[allow(async_fn_in_trait)]
6pub trait ContainerRuntime {
7 async fn start(&self, flow: &Flow) -> Result<()>;
8 async fn stop(&self, flow: &Flow) -> Result<()>;
9 async fn status(&self) -> Result<Vec<ContainerStatus>>;
10}
11
12#[derive(Debug, Clone)]
14pub struct ContainerStatus {
15 pub name: String,
16 pub state: ContainerState,
17 pub image: String,
18}
19
20#[derive(Debug, Clone, PartialEq)]
22pub enum ContainerState {
23 Running,
24 Stopped,
25 Paused,
26 Unknown,
27}