mirror of
https://github.com/cloudflare/pingora.git
synced 2024-09-19 18:21:34 +02:00
Addressing github #231 - Cleaning up cli-help text
This commit is contained in:
parent
5cf12e17c2
commit
9ea87b231e
2 changed files with 19 additions and 13 deletions
2
.bleep
2
.bleep
|
@ -1 +1 @@
|
|||
755ce66cddc4805c0a264c31a2e3cd7cab352755
|
||||
719b4dcafd471ecfa9e4ade3abfb217929afddc6
|
|
@ -122,35 +122,41 @@ impl Default for ServerConf {
|
|||
#[clap(name = "basic")]
|
||||
pub struct Opt {
|
||||
/// Whether this server should try to upgrade from a running old server
|
||||
///
|
||||
/// `-u` or `--upgrade` can be used
|
||||
#[clap(short, long)]
|
||||
#[clap(
|
||||
short,
|
||||
long,
|
||||
help = "This is the base set of command line arguments for a pingora-based service"
|
||||
)]
|
||||
pub upgrade: bool,
|
||||
|
||||
/// Whether should run this server in the background
|
||||
///
|
||||
/// `-d` or `--daemon` can be used
|
||||
#[clap(short, long)]
|
||||
pub daemon: bool,
|
||||
|
||||
/// Not actually used. This flag is there so that the server is not upset seeing this flag
|
||||
/// passed from `cargo test` sometimes
|
||||
#[clap(long)]
|
||||
#[clap(long, hidden = true)]
|
||||
pub nocapture: bool,
|
||||
|
||||
/// Test the configuration and exit
|
||||
///
|
||||
/// When this flag is set, calling `server.bootstrap()` will exit the process without errors
|
||||
///
|
||||
/// This flag is useful for upgrading service where the user wants to make sure the new
|
||||
/// service can start before shutting down the old server process.
|
||||
///
|
||||
/// `-t` or `--test` can be used
|
||||
#[clap(short, long)]
|
||||
#[clap(
|
||||
short,
|
||||
long,
|
||||
help = "This flag is useful for upgrading service where the user wants \
|
||||
to make sure the new service can start before shutting down \
|
||||
the old server process."
|
||||
)]
|
||||
pub test: bool,
|
||||
|
||||
/// The path to the configuration file.
|
||||
///
|
||||
/// See [`ServerConf`] for more details of the configuration file.
|
||||
///
|
||||
/// `-c` or `--conf` can be used
|
||||
#[clap(short, long)]
|
||||
#[clap(short, long, help = "The path to the configuration file.")]
|
||||
pub conf: Option<String>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue