method IDnsResolver.resolveSrv
IDnsResolver.resolveSrv(hostname: string): Promise<readonly SrvRecord[]>

Resolves SRV records for a hostname.

Parameters

hostname: string

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

Return Type

Promise<readonly SrvRecord[]>

The records, possibly empty

Throws

Error

If the lookup fails

Usage

import { type IDnsResolver } from "common/src/index.ts";