Documentation
¶
Index ¶
- type Answered
- type Queries
- func (c *Queries) Delete(h string)
- func (c *Queries) DeleteNX(h string)
- func (c *Queries) Exists(q string) bool
- func (c *Queries) ExistsNX(q string) bool
- func (c *Queries) ExpiredMXQueries() []string
- func (c *Queries) ExpiredQueries() []string
- func (c *Queries) Get(s string) *dns.Msg
- func (c *Queries) GetTTL() int
- func (c *Queries) HasExpired(s string) bool
- func (c *Queries) HasExpiredNX(s string) bool
- func (c *Queries) NewNX()
- func (c *Queries) NewResolved()
- func (c *Queries) Question(msg *dns.Msg) string
- func (c *Queries) Register(s string, msg *dns.Msg) bool
- func (c *Queries) RegisterNX(s string) bool
- func (c *Queries) Renew(s string, msg *dns.Msg) bool
- func (c *Queries) RenewNX(s string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queries ¶
Queries for storing dns answers
func (*Queries) ExpiredMXQueries ¶
ExpiredMXQueries (blocking) for returning all expired NX questions. Returns empty slice if c.ttl is < 0
func (*Queries) ExpiredQueries ¶
ExpiredQueries (blocking) for returning all expired questions. Returns empty slice if c.ttl is < 0
func (*Queries) HasExpired ¶
HasExpired for checking if a specific question in cache has expired
func (*Queries) HasExpiredNX ¶
HasExpiredNX for checking if a specific question in NX cache has expired
func (*Queries) NewNX ¶
func (c *Queries) NewNX()
NewNX replaces current cache.nx map with a new map by copying all the elements. See cache.NewResolved for additional information
func (*Queries) NewResolved ¶
func (c *Queries) NewResolved()
NewResolved replaces current cache.resolved map with a new map by copying all the elements. We this to free up memory, since the allocated memory by cache.resolved is that that the map had at its peak
func (*Queries) RegisterNX ¶
RegisterNX (blocking) for adding a new question to NX cache