feat(controller): add listen-address flag

This commit is contained in:
Daniel Lundin 2025-01-08 16:39:36 +01:00
parent abd6748703
commit a9a4c513f5
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI

View file

@ -29,6 +29,13 @@ struct Cli {
value_name = "LOG_TO_STDERR"
)]
log_stderr: bool,
#[arg(
long = "listen-address",
default_value = "0.0.0.0:9474",
value_name = "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()
};