Documentation
¶
Overview ¶
Package cache provides an in-memory cache to store answers from remote DNS servers
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Lookup(string, uint16, uint16) ([]rr.RR, Status, error) LookupQuestion(dns.Question) ([]rr.RR, Status, error) Set(string, []rr.RR) error }
Cache describes a cache interface to store RRs retrieved from remote DNS servers
type DefaultCache ¶
DefaultCache implements the Cache interface and stores RRs in an in-memory tree
func NewDefaultCache ¶
func NewDefaultCache(l *logger.Logger) *DefaultCache
NewDefaultCache returns a new default in-memory tree cache
func (*DefaultCache) Lookup ¶
Lookup looks up a entry for name with class and type and returns the status and errors encountered along the way
func (*DefaultCache) LookupQuestion ¶
LookupQuestion is a convenience function to lookup a DNS question
Click to show internal directories.
Click to hide internal directories.