From a9bfafd7fc7348861291da44a9c5ea786deda8ea Mon Sep 17 00:00:00 2001 From: Michael-J-Ward Date: Wed, 17 Apr 2024 10:20:14 -0500 Subject: [PATCH] refactor: use `addr` instead of `bind` to configure daemon listen address --- binaries/cli/src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/binaries/cli/src/main.rs b/binaries/cli/src/main.rs index f02482fd..6af24858 100644 --- a/binaries/cli/src/main.rs +++ b/binaries/cli/src/main.rs @@ -106,10 +106,11 @@ enum Command { Daemon { #[clap(long)] machine_id: Option, + /// The IP address and port this daemon will bind to. #[clap(long, default_value_t = SocketAddr::new( IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 0) )] - bind: SocketAddr, + addr: SocketAddr, #[clap(long)] coordinator_addr: Option, @@ -292,7 +293,7 @@ fn run() -> eyre::Result<()> { } Command::Daemon { coordinator_addr, - bind, + addr, machine_id, run_dataflow, } => { @@ -314,12 +315,12 @@ fn run() -> eyre::Result<()> { Daemon::run_dataflow(&dataflow_path).await } None => { - let addr = coordinator_addr.unwrap_or_else(|| { + let coordination_addr = coordinator_addr.unwrap_or_else(|| { tracing::info!("Starting in local mode"); let localhost = Ipv4Addr::new(127, 0, 0, 1); (localhost, DORA_COORDINATOR_PORT_DEFAULT).into() }); - Daemon::run(addr, machine_id.unwrap_or_default(), bind).await + Daemon::run(coordination_addr, machine_id.unwrap_or_default(), addr).await } } })