Documentation ¶
Index ¶
- func A(rr string) *dns.A
- func AAAA(rr string) *dns.AAAA
- func CNAME(rr string) *dns.CNAME
- func CoreDNSServer(corefile string) (*caddy.Instance, error)
- func CoreDNSServerPorts(i *caddy.Instance, k int) (udp, tcp string)
- func CoreDNSServerStop(i *caddy.Instance)
- func DNSKEY(rr string) *dns.DNSKEY
- func Header(t *testing.T, tc Case, resp *dns.Msg) bool
- func MX(rr string) *dns.MX
- func Msg(zone string, typ uint16, o *dns.OPT) *dns.Msg
- func NS(rr string) *dns.NS
- func NSEC(rr string) *dns.NSEC
- func OPT(bufsize int, do bool) *dns.OPT
- func PTR(rr string) *dns.PTR
- func RRSIG(rr string) *dns.RRSIG
- func SOA(rr string) *dns.SOA
- func SRV(rr string) *dns.SRV
- func Section(t *testing.T, tc Case, sect Sect, rr []dns.RR) bool
- func TCPServer(t *testing.T, laddr string) (*dns.Server, string, error)
- func TXT(rr string) *dns.TXT
- func TempFile(t *testing.T, dir, content string) (string, func(), error)
- func UDPServer(t *testing.T, laddr string) (*dns.Server, string, error)
- type Case
- type Handler
- type HandlerFunc
- type Input
- type RRSet
- type ResponseWriter
- func (t *ResponseWriter) Close() error
- func (t *ResponseWriter) Hijack()
- func (t *ResponseWriter) LocalAddr() net.Addr
- func (t *ResponseWriter) RemoteAddr() net.Addr
- func (t *ResponseWriter) TsigStatus() error
- func (t *ResponseWriter) TsigTimersOnly(bool)
- func (t *ResponseWriter) Write(buf []byte) (int, error)
- func (t *ResponseWriter) WriteMsg(m *dns.Msg) error
- type Sect
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoreDNSServer ¶
CoreDNSServer returns a CoreDNS test server. It just takes a normal Corefile as input.
func CoreDNSServerPorts ¶
CoreDNSServeRPorts returns the ports the instance is listening on. The integer k indicates which ServerListener you want.
func CoreDNSServerStop ¶
CoreDNSSserverStop stops a server.
Types ¶
type Case ¶
type Case struct { Qname string Qtype uint16 Rcode int Do bool Answer []dns.RR Ns []dns.RR Extra []dns.RR }
If the TTL of a record is 303 we don't care what the TTL is.
type Handler ¶
Copied here to prevent an import cycle.
func ErrorHandler ¶
func ErrorHandler() Handler
type HandlerFunc ¶
HandlerFunc is a convenience type like dns.HandlerFunc, except ServeDNS returns an rcode and an error.
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
func (*Input) ServerType ¶
type ResponseWriter ¶
type ResponseWriter struct{}
func (*ResponseWriter) Close ¶
func (t *ResponseWriter) Close() error
func (*ResponseWriter) Hijack ¶
func (t *ResponseWriter) Hijack()
func (*ResponseWriter) LocalAddr ¶
func (t *ResponseWriter) LocalAddr() net.Addr
func (*ResponseWriter) RemoteAddr ¶
func (t *ResponseWriter) RemoteAddr() net.Addr
func (*ResponseWriter) TsigStatus ¶
func (t *ResponseWriter) TsigStatus() error
func (*ResponseWriter) TsigTimersOnly ¶
func (t *ResponseWriter) TsigTimersOnly(bool)
Click to show internal directories.
Click to hide internal directories.