Documentation ¶
Index ¶
- type DNSServer
- func (ds *DNSServer) DeleteA(host string)
- func (ds *DNSServer) DeleteSRV(service, protocol string)
- func (ds *DNSServer) GetA(fqdn string) *dns.A
- func (ds *DNSServer) GetSRV(spec string) []*dns.SRV
- func (ds *DNSServer) Listen(listenSpec string) error
- func (ds *DNSServer) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
- func (ds *DNSServer) SetA(host string, ip net.IP)
- func (ds *DNSServer) SetSRV(service, protocol string, srvs []SRVRecord)
- type SRVRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSServer ¶
type DNSServer struct { Domain string // using the constructor, this will always end in a '.', making it a FQDN. // contains filtered or unexported fields }
Struct which describes the DNS server.
func NewDNSServer ¶
Create a new DNS server. Domain is an unqualified domain that will be used as the TLD.
func (*DNSServer) GetSRV ¶
Given a service spec, looks up and returns an array of *dns.SRV objects. These must be massaged into the []dns.RR after the fact.
func (*DNSServer) Listen ¶
Listen for DNS requests. listenSpec is a dotted-quad + port, e.g., 127.0.0.1:53. This function blocks and only returns when the DNS service is no longer functioning.
func (*DNSServer) ServeDNS ¶
func (ds *DNSServer) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
Main callback for miekg/dns. Collects information about the query, constructs a response, and returns it to the connector.
Click to show internal directories.
Click to hide internal directories.