refactor: single-pass resolv.conf parsing, eliminate redundancies
Parse resolv.conf once for both upstream and search domains instead of 2-3 reads. Extract CLOUD_VPC_RESOLVER constant. Use &'static str for mode in StatsResponse. Remove dead read_upstream_from_file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -108,7 +108,6 @@ async fn main() -> numa::Result<()> {
|
||||
|
||||
let root_hints = numa::recursive::parse_root_hints(&config.upstream.root_hints);
|
||||
|
||||
// Resolve upstream mode + address in one block
|
||||
let resolved_mode;
|
||||
let upstream_auto;
|
||||
let (upstream, upstream_label) = if config.upstream.mode == numa::config::UpstreamMode::Auto {
|
||||
|
||||
Reference in New Issue
Block a user