generated from Patagia/template-nix
feat(controller): use env in clap to allow env var config
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Some checks failed
ci/woodpecker/push/ci Pipeline failed
This commit is contained in:
parent
a9a4c513f5
commit
7333ced376
2 changed files with 4 additions and 3 deletions
|
@ -27,6 +27,7 @@ anyhow = "1.0.95"
|
|||
clap = { version = "4.5.23", features = [
|
||||
"derive",
|
||||
"deprecated",
|
||||
"env",
|
||||
"wrap_help",
|
||||
"string",
|
||||
] }
|
||||
|
|
|
@ -18,7 +18,7 @@ struct Cli {
|
|||
#[arg(
|
||||
long = "telemetry-otlp-endpoint",
|
||||
default_value = "http://localhost:4317",
|
||||
value_name = "OTEL_EXPORTER_OTLP_ENDPOINT"
|
||||
env = "OTEL_EXPORTER_OTLP_ENDPOINT",
|
||||
)]
|
||||
otlp_endpoint: Option<String>,
|
||||
|
||||
|
@ -26,14 +26,14 @@ struct Cli {
|
|||
long = "log-stderr",
|
||||
short = 'v',
|
||||
default_value = "false",
|
||||
value_name = "LOG_TO_STDERR"
|
||||
env = "LOG_TO_STDERR"
|
||||
)]
|
||||
log_stderr: bool,
|
||||
|
||||
#[arg(
|
||||
long = "listen-address",
|
||||
default_value = "0.0.0.0:9474",
|
||||
value_name = "LISTEN_ADDRESS"
|
||||
env = "LISTEN_ADDRESS"
|
||||
)]
|
||||
listen_address: String,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue