resolver

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 8 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(ctx context.Context, key CacheKey) (msg *dns.Msg, ttl time.Duration)

func (*Cache) RefreshTTL

func (c *Cache) RefreshTTL(key CacheKey)

func (*Cache) Store

func (c *Cache) Store(ctx context.Context, 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