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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
use std::fmt::Debug;
use std::path::PathBuf;
use clap::Parser;
mod create;
mod delete;
mod kill;
mod start;
mod state;
pub use {create::Create, delete::Delete, kill::Kill, start::Start, state::State};
mod checkpoint;
mod events;
mod exec;
mod list;
mod pause;
mod ps;
mod resume;
mod run;
mod spec;
mod update;
pub use {
checkpoint::Checkpoint, events::Events, exec::Exec, list::List, pause::Pause, ps::Ps,
resume::Resume, run::Run, spec::Spec, update::Update,
};
#[derive(Parser, Debug)]
pub enum StandardCmd {
Create(Create),
Start(Start),
State(State),
Kill(Kill),
Delete(Delete),
}
#[derive(Parser, Debug)]
pub enum CommonCmd {
Checkpointt(Checkpoint),
Events(Events),
Exec(Exec),
List(List),
Pause(Pause),
#[clap(allow_hyphen_values = true)]
Ps(Ps),
Resume(Resume),
Run(Run),
Update(Update),
Spec(Spec),
}
#[derive(Parser, Debug)]
pub struct GlobalOpts {
#[clap(long)]
pub debug: bool,
#[clap(short, long)]
pub log: Option<PathBuf>,
#[clap(long)]
pub log_format: Option<String>,
#[clap(short, long)]
pub root: Option<PathBuf>,
#[clap(short, long)]
pub systemd_cgroup: bool,
}