pub struct CliArgs {
pub listen: Option<String>,
pub domain: Option<i32>,
pub types: Vec<String>,
pub tls_cert: Option<String>,
pub tls_key: Option<String>,
pub auth_token: Option<String>,
pub log_level: Option<String>,
pub metrics: Option<String>,
pub version: bool,
pub help: bool,
}Expand description
Parsed CLI args.
Fields§
§listen: Option<String>--listen <ADDR> — HTTP bind address override.
domain: Option<i32>--domain <ID> — DDS domain id override.
types: Vec<String>--type <NAME=FILE> — a type source override (repeatable).
tls_cert: Option<String>--tls-cert <FILE> — TLS cert file (PEM); enables https://.
tls_key: Option<String>--tls-key <FILE> — TLS key file (PEM).
auth_token: Option<String>--auth-token <SECRET> — bearer token auth.
log_level: Option<String>--log-level <LEVEL>.
metrics: Option<String>--metrics <ADDR> — Prometheus listen address.
version: bool--version.
help: bool--help.
Implementations§
Source§impl CliArgs
impl CliArgs
Sourcepub fn sets(&self) -> Vec<String>
pub fn sets(&self) -> Vec<String>
The convenience flags as PATH=VALUE assignments, in the order
the daemon applies them.
Sourcepub fn type_entries(&self) -> Vec<(&str, &str)>
pub fn type_entries(&self) -> Vec<(&str, &str)>
Every --type NAME=FILE as (name, file), in the order given; each
is one entry appended to types. parse has refused a value
without =.
Sourcepub fn apply_to(
&self,
command_line: &mut CommandLine,
) -> Result<(), ConfigError>
pub fn apply_to( &self, command_line: &mut CommandLine, ) -> Result<(), ConfigError>
Adds the convenience flags to command_line: Self::sets as
--set after any explicit one, then each --type as one entry
appended to types.
§Errors
Whatever CommandLine::push_set or CommandLine::push_entry
reports.