Documentation
¶
Index ¶
- type DNSCache
- func (cache *DNSCache) Add(record ...dns.RR) error
- func (cache *DNSCache) Addr() string
- func (cache *DNSCache) Close()
- func (cache *DNSCache) Lookup(host string, Qclass uint16, Qtype uint16) ([]dns.RR, error)
- func (cache *DNSCache) ResolveAndAdd(dnsServer, net string, host string, Qclass uint16, Qtype uint16) error
- func (cache *DNSCache) Resolver() *net.Resolver
- func (cache *DNSCache) Server() error
- func (cache *DNSCache) Truncate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSCache ¶
type DNSCache struct { Logger *zap.Logger MaxLookupAttempts int DialTimeout time.Duration // contains filtered or unexported fields }
DNSCache is a net.Resolver compliant DNS Resolver
func (*DNSCache) Close ¶
func (cache *DNSCache) Close()
Close closes an DNSCache Server (started with Server())
func (*DNSCache) ResolveAndAdd ¶
func (cache *DNSCache) ResolveAndAdd(dnsServer, net string, host string, Qclass uint16, Qtype uint16) error
ResolveAndAdd resolves and adds the result to the cache
Click to show internal directories.
Click to hide internal directories.