add cg ls, prepare for rc subcommands

This commit is contained in:
Mikaël Cluseau
2026-04-12 19:55:56 +02:00
parent 0f116e21b9
commit 6dc04ad100
7 changed files with 343 additions and 0 deletions
+14
View File
@@ -81,6 +81,16 @@ enum Command {
#[arg(long, default_value = "5s")]
timeout: Duration,
},
Cg {
#[command(subcommand)]
cmd: CgCmd,
},
}
#[derive(Subcommand)]
enum CgCmd {
Ls,
}
#[tokio::main(flavor = "current_thread")]
@@ -157,6 +167,10 @@ async fn main() -> Result<()> {
.run()
.await
.map(|_| ())?),
C::Cg { cmd } => match cmd {
CgCmd::Ls => Ok(dkl::cgroup::ls().await?),
},
}
}