Skip to main content

resolve_bind_addr

Function resolve_bind_addr 

Source
pub fn resolve_bind_addr(
    cli_bind: Option<String>,
    config: &BhtuneConfig,
) -> String
Expand description

Resolve bhtune-server’s bind address with CLI flag > env var > config file > default precedence, matching resolve_bridge_host’s shape exactly. bhtune-server has no clap dependency (see AGENTS.md’s “Deferred setup”), so unlike resolve_bridge_host the env var isn’t folded in by a derive attribute upstream – callers pass std::env::var("BHTUNE_BIND").ok() (or a real CLI flag, if one is ever added) directly as cli_bind.