cromwell
cromwell copied to clipboard
implement a command about show container process.
Now, $ cromwell ps is implemented by super::pids::{Pidfile, show}.
But the state of pids::Pidfile overlaps with process::Process.
I proposal follow.
pub enum State {
Created
Running
Pausing
Paused
Stopped
}
pub enum Status {
state: State
pid: Pid
}
pub struct Container {
// ...
status: Status
}
impl Container {
// ...
// get all container process
fn processes() -> [Pid] {}
// return process state
fn status(&self) -> Status {}
}