edgeport - v1.0.6
    Preparing search index...

    Function record

    • Builds a ResourceRecord, encoding the rdata from structured data (or accepting raw bytes).

      A convenience for constructing answers/authority/additional records to feed encodeMessage; data may be the typed shape for the TYPE or a Uint8Array of raw rdata.

      Parameters

      • name: string

        The owner name.

      • type: number

        The record TYPE.

      • ttl: number

        The TTL in seconds.

      • data: RData

        The structured data or raw rdata bytes.

      • cls: number = RecordClass.IN

        The CLASS; defaults to RecordClass.IN.

      Returns ResourceRecord

      The assembled record.

      1.0.4

      import { record, RecordType } from 'edgeport/dns';

      const rr = record('example.com', RecordType.A, 3600, '93.184.216.34');