cache

package
v0.0.0-...-2de874f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: MIT Imports: 4 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 {
	// contains filtered or unexported fields
}

func MakeCache

func MakeCache(size int) *Cache

func (*Cache) Get

func (cache *Cache) Get(domainName dns.Name, recordType dns.Type) ([]dns.RR, bool)

func (*Cache) Set

func (cache *Cache) Set(domainName dns.Name, records []dns.RR, tangent bool)

type Domain

type Domain struct {
	Expires time.Time
	// contains filtered or unexported fields
}

func (*Domain) Get

func (domain *Domain) Get(dnsType dns.Type) *RecordSet

func (*Domain) Set

func (domain *Domain) Set(dnsType dns.Type, records *RecordSet)

type Record

type Record struct {
	RR      dns.RR
	Expires time.Time
}

type RecordSet

type RecordSet struct {
	Expires time.Time
	// contains filtered or unexported fields
}

func (*RecordSet) Add

func (records *RecordSet) Add(record *Record)

func (*RecordSet) GetRecords

func (records *RecordSet) GetRecords() []dns.RR

func (*RecordSet) Len

func (records *RecordSet) Len() int

Jump to

Keyboard shortcuts

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