Added descriptions [CI SKIP]

This commit is contained in:
shimunn 2019-04-03 16:57:00 +02:00
parent 6a13b27c19
commit d1daf3be00

View File

@ -4,14 +4,16 @@ use structopt::StructOpt;
#[derive(StructOpt, Debug)] #[derive(StructOpt, Debug)]
#[structopt(name = "event-gen")] #[structopt(name = "event-gen")]
pub struct Opts { pub struct Opts {
///Time after which a client is considered as offline
#[structopt( #[structopt(
short = "t", short = "t",
long = "timeout", long = "timeout",
default_value = "120", default_value = "115",
env = "WG_EVENT_TIMEOUT" env = "WG_EVENT_TIMEOUT"
)] )]
pub timeout: u64, pub timeout: u64,
///Interval after which Wireguard will be polled for updates
#[structopt( #[structopt(
short = "p", short = "p",
long = "poll-interval", long = "poll-interval",
@ -20,6 +22,7 @@ pub struct Opts {
)] )]
pub poll: u64, pub poll: u64,
///Programm to run when an event has fired
#[structopt( #[structopt(
short = "e", short = "e",
long = "event-handler", long = "event-handler",
@ -28,12 +31,15 @@ pub struct Opts {
)] )]
pub events: Option<PathBuf>, pub events: Option<PathBuf>,
///Don't exit on API errors
#[structopt(short = "I", long = "ignore-socket-err", env = "WG_IGNORE_SOCKET_ERR")] #[structopt(short = "I", long = "ignore-socket-err", env = "WG_IGNORE_SOCKET_ERR")]
pub ignore_socket_errors: bool, pub ignore_socket_errors: bool,
///Log all events to Stdout
#[structopt(short = "l", long = "log", env = "WG_LOG_EVENTS")] #[structopt(short = "l", long = "log", env = "WG_LOG_EVENTS")]
pub log: bool, pub log: bool,
///Socket for the userspace implementation to poll
#[structopt(name = "SOCKET", parse(from_os_str), env = "WG_EVENT_SOCKET")] #[structopt(name = "SOCKET", parse(from_os_str), env = "WG_EVENT_SOCKET")]
pub socket: PathBuf, pub socket: PathBuf,
} }