local

package
v0.0.0-...-97a175b Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalRecords

type LocalRecords struct {
	Records []Record
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Local) *LocalRecords

New creates a new LocalRecords instance. It converts the configuration records to DNS messages and adds them to the local records cache.

func (*LocalRecords) Query

func (l *LocalRecords) Query(q *dns.Question) []dns.RR

Query returns the DNS message for the given question.

type Record

type Record struct {
	Question *dns.Question
	Answer   []dns.RR
	Expiry   time.Time
}

Jump to

Keyboard shortcuts

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