Setu-TS
    Preparing search index...

    Interface IDnsResolver

    DNS resolution, abstracted across runtimes.

    Exposed as the optional IRuntimeServices.dns. fetch cannot express an SRV lookup, which is how Consul DNS, Kubernetes headless services, and ECS Service Connect are actually consumed — hence a resolver seam rather than making callers reach for a runtime global.

    0.2.0

    interface IDnsResolver {
        resolveHost(hostname: string): Promise<readonly string[]>;
        resolveSrv(hostname: string): Promise<readonly SrvRecord[]>;
    }
    Index
    • Resolves a hostname to IP address literals.

      Concatenates A and AAAA results. A host with only one family present resolves successfully with just that family's addresses; the lookup rejects only when both families fail.

      Parameters

      • hostname: string

        Hostname to resolve

      Returns Promise<readonly string[]>

      IPv4 and IPv6 address literals, possibly empty

      If both address families fail to resolve

    • Resolves SRV records for a hostname.

      Parameters

      • hostname: string

        Fully qualified SRV name (_http._tcp.example.com)

      Returns Promise<readonly SrvRecord[]>

      The records, possibly empty

      If the lookup fails