cache

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 Cache

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

func New

func New() *Cache

func (*Cache) Add

func (c *Cache) Add(q *dns.Question, records []dns.RR)

func (*Cache) Query

func (c *Cache) Query(q *dns.Question) []dns.RR

func (*Cache) RemoveExpired

func (c *Cache) RemoveExpired()

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