From a9a4c513f5a9577ef1235de88e4c7419c257d850 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Wed, 8 Jan 2025 16:39:36 +0100 Subject: [PATCH] feat(controller): add listen-address flag --- controller/src/bin/patagia-controller.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/controller/src/bin/patagia-controller.rs b/controller/src/bin/patagia-controller.rs index 7c43aa5..b8734f9 100644 --- a/controller/src/bin/patagia-controller.rs +++ b/controller/src/bin/patagia-controller.rs @@ -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() };