generated from Patagia/template-nix
Compare commits
2 commits
abd6748703
...
7333ced376
Author | SHA1 | Date | |
---|---|---|---|
7333ced376 | |||
a9a4c513f5 |
2 changed files with 11 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,9 +26,16 @@ 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",
|
||||
env = "LISTEN_ADDRESS"
|
||||
)]
|
||||
listen_address: String,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -39,7 +46,7 @@ async fn main() -> Result<()> {
|
|||
tracing::info!("Patagia Controller");
|
||||
|
||||
let config = ConfigDropshot {
|
||||
bind_address: SocketAddr::from_str("0.0.0.0:9474").unwrap(),
|
||||
bind_address: SocketAddr::from_str(&args.listen_address).unwrap(),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue