Documentation ¶ Index ¶ func AddSubnetOpt(m *dns.Msg, ip net.IP) type Cache func NewCache() *Cache func (c *Cache) Load(key CacheKey) *dns.Msg func (c *Cache) Store(key CacheKey, mr *dns.Msg, ttl time.Duration) func (c *Cache) WithLogger(logger logger.Logger) *Cache type CacheKey func NewCacheKey(q *dns.Question) CacheKey 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) *dns.Msg 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. Source Files ¶ View all Source files cache.go resolver.go Click to show internal directories. Click to hide internal directories.