resolver

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSubnetOpt

func AddSubnetOpt(m *dns.Msg, ip net.IP)

Types

type Cache

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

func NewCache

func NewCache() *Cache

func (*Cache) Load

func (c *Cache) Load(key CacheKey) (msg *dns.Msg, ttl time.Duration)

func (*Cache) RefreshTTL

func (c *Cache) RefreshTTL(key CacheKey)

func (*Cache) Store

func (c *Cache) Store(key CacheKey, mr *dns.Msg, ttl time.Duration)

func (*Cache) WithLogger

func (c *Cache) WithLogger(logger logger.Logger) *Cache

type CacheKey

type CacheKey string

func NewCacheKey

func NewCacheKey(q *dns.Question) CacheKey

NewCacheKey generates resolver cache key from question of dns query.

Jump to

Keyboard shortcuts

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