Documentation
¶
Index ¶
- func KeyGen(q Question) string
- func UnFqdn(s string) string
- type Cache
- type DBRecodes
- type DDNSHandler
- func (h *DDNSHandler) AddrRecode(domain string, qtype uint16, prrs []dns.RR) (rrs []dns.RR)
- func (h *DDNSHandler) CNAMERecode(name string) (rs []dns.RR)
- func (h *DDNSHandler) DoTCP(w dns.ResponseWriter, req *dns.Msg)
- func (h *DDNSHandler) DoUDP(w dns.ResponseWriter, req *dns.Msg)
- func (h *DDNSHandler) PTRRecords(q dns.Question) (records []dns.RR, err error)
- func (h *DDNSHandler) ServeDNSReverse(w dns.ResponseWriter, req *dns.Msg) *dns.Msg
- type FileHosts
- type Hosts
- type NetType
- type Question
- type ResolvError
- type Resolver
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache interface { Get(key string) (*dns.Msg, error) Set(key string, Msg *dns.Msg) error Exists(key string) bool Remove(key string) Length() int }
func NewMemCache ¶
type DBRecodes ¶
func NewDBRecodes ¶
func (*DBRecodes) GetAddrCname ¶
func (*DBRecodes) GetAddress ¶
func (*DBRecodes) GetCNAMERecode ¶
func (*DBRecodes) ReverseGet ¶
type DDNSHandler ¶
type DDNSHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(db model.IDatabase) *DDNSHandler
func (*DDNSHandler) AddrRecode ¶
func (*DDNSHandler) CNAMERecode ¶
func (h *DDNSHandler) CNAMERecode(name string) (rs []dns.RR)
func (*DDNSHandler) DoTCP ¶
func (h *DDNSHandler) DoTCP(w dns.ResponseWriter, req *dns.Msg)
func (*DDNSHandler) DoUDP ¶
func (h *DDNSHandler) DoUDP(w dns.ResponseWriter, req *dns.Msg)
func (*DDNSHandler) PTRRecords ¶
func (*DDNSHandler) ServeDNSReverse ¶
func (h *DDNSHandler) ServeDNSReverse(w dns.ResponseWriter, req *dns.Msg) *dns.Msg
ServeDNSReverse is the handler for DNS requests for the reverse zone. If nothing is found locally the request is forwarded to the forwarder for resolution.
type Hosts ¶
type Hosts struct {
// contains filtered or unexported fields
}
func NewHosts ¶
func NewHosts(hs config.HostsSettings) Hosts
type ResolvError ¶
type ResolvError struct {
// contains filtered or unexported fields
}
ResolvError ...
func (ResolvError) Error ¶
func (e ResolvError) Error() string
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver ...
func (*Resolver) Lookup ¶
Lookup will ask each nameserver in top-to-bottom fashion, starting a new request in every second, and return as early as possbile (have an answer). It returns an error if no request has succeeded.
func (*Resolver) Nameservers ¶
Nameservers return the array of nameservers, with port number appended. '#' in the name is treated as port separator, as with dnsmasq.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.