Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/node/dns.ts>resolveSoa

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function resolveSoa
import { resolveSoa } from "https://deno.land/std@0.145.0/node/dns.ts";

Uses the DNS protocol to resolve a start of authority record (SOA record) for the hostname. The address argument passed to the callback function will be an object with the following properties:

  • nsname
  • hostmaster
  • serial
  • refresh
  • retry
  • expire
  • minttl
{
  nsname: 'ns.example.com',
  hostmaster: 'root.example.com',
  serial: 2013101809,
  refresh: 10000,
  retry: 2400,
  expire: 604800,
  minttl: 3600
}

Parameters

hostname: string
callback: (err: ErrnoException | null, address: SoaRecord) => void