update

package
v0.0.0-...-998db38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package update provides RFC2136 dynamic DNS update functionality with TSIG authentication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPTRDelete

func BuildPTRDelete(catalogZone, label string) (*dns.Msg, error)

BuildPTRDelete creates an update message for removing a PTR record from a catalog zone

func BuildPTRUpdate

func BuildPTRUpdate(catalogZone, memberZone, label string, ttl uint32) (*dns.Msg, error)

BuildPTRUpdate creates an update message for adding a PTR record to a catalog zone This implements the idempotent catalog update from spec 10.4

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides RFC2136 dynamic update functionality with TSIG authentication

func NewClient

func NewClient(server, tsigName, tsigSecret, tsigAlgorithm string) *Client

NewClient creates a new RFC2136 update client

func (*Client) AddRRset

func (c *Client) AddRRset(zone string, rrs []dns.RR) (*dns.Msg, error)

AddRRset adds or replaces an RRset

func (*Client) DeleteAllRRs

func (c *Client) DeleteAllRRs(zone, owner string) (*dns.Msg, error)

DeleteAllRRs deletes all records at a name (RFC2136 Section 2.5.2)

func (*Client) DeleteRR

func (c *Client) DeleteRR(zone string, rr dns.RR) (*dns.Msg, error)

DeleteRR deletes a specific resource record

func (*Client) DeleteRRset

func (c *Client) DeleteRRset(zone, owner string, rrType uint16) (*dns.Msg, error)

DeleteRRset deletes an RRset

func (*Client) Query

func (c *Client) Query(name string, rrType uint16) (*dns.Msg, error)

Query performs a standard DNS query

func (*Client) SetTCP

func (c *Client) SetTCP(useTCP bool)

SetTCP sets whether to use TCP for updates

func (*Client) SetTimeout

func (c *Client) SetTimeout(d time.Duration)

SetTimeout sets the timeout for DNS operations

func (*Client) Update

func (c *Client) Update(update *dns.Msg) (*dns.Msg, error)

Update sends an RFC2136 update message

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL