// Package traverse implements the core DNS traversal engine for ExploreDNS. // // The traversal engine starts from the DNS root servers and iteratively // follows every referral it receives, building a complete picture of the // delegation path for a domain. Unlike a standard recursive resolver, which // stops at the first authoritative answer, the traversal engine explores every // branch so that delegation mismatches, lame delegations, or split authorities // are all visible in the output. // // # Architecture // // A Traverser maintains a stack of Referral objects. Each Referral // represents a pending query to a specific set of nameservers for a specific // name and record type. The engine pops referrals one at a time, sends the // query, classifies the response, and pushes any child referrals back onto the // stack. // // When a referral contains nameserver names but no glue records (IP addresses), // the engine resolves them via a secondary traversal before continuing. // // # Caching // // An InfoCache stores discovered glue records. In fast mode (default) a // single root cache is shared across all branches so that glue discovered in // one branch is immediately available to sibling branches. Disable fast mode // (TraverserConfig.Fast = false) for fully independent branch resolution. package traverse