liboci_cli/
ps.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
use clap::{self, Parser};

/// Display the processes inside the container
#[derive(Parser, Debug)]
pub struct Ps {
    /// format to display processes: table or json (default: "table")
    #[clap(short, long, default_value = "table")]
    pub format: String,
    #[clap(value_parser = clap::builder::NonEmptyStringValueParser::new(), required = true)]
    pub container_id: String,
    /// options will be passed to the ps utility
    #[clap(last = true)]
    pub ps_options: Vec<String>,
}