cache

package
v0.0.0-...-436e6ca Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 6 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 {
	sync.Mutex
	// contains filtered or unexported fields
}

Cache - DNS cache struct

func NewCache

func NewCache(ttl time.Duration) *Cache

NewCache - Create a new cache struct

func (*Cache) Insert

func (c *Cache) Insert(question []dns.Question, answer []dns.RR)

Insert - Insert a new entry in Cache

func (*Cache) Routine

func (c *Cache) Routine()

Routine - Starts the cache cleaning routine

func (*Cache) Search

func (c *Cache) Search(question []dns.Question) []dns.RR

Search - Search for DNS answer in cache

Jump to

Keyboard shortcuts

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