Documentation ¶
Index ¶
- func GetRandomHostLabel(maxLen int) string
- func GetRandomHostName() string
- func MustNewNameNode(name string, class dns.Class) *dnsutils.NameNode
- func MustNewRR(s string) dns.RR
- func MustNewRRSet(name string, ttl uint32, class dns.Class, rrtype uint16, rrs []dns.RR) *dnsutils.RRSet
- func MustNewZone(name string, class dns.Class) *dnsutils.Zone
- type ResponseWriter
- func (w *ResponseWriter) Close() error
- func (w *ResponseWriter) Hijack()
- func (w *ResponseWriter) LocalAddr() net.Addr
- func (w *ResponseWriter) RemoteAddr() net.Addr
- func (w *ResponseWriter) TsigStatus() error
- func (w *ResponseWriter) TsigTimersOnly(bool)
- func (w *ResponseWriter) Write(bs []byte) (int, error)
- func (w *ResponseWriter) WriteMsg(msg *dns.Msg) error
- type TestGenerator
- type TestNameNodeInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandomHostLabel ¶ added in v1.4.0
func GetRandomHostName ¶ added in v1.4.0
func GetRandomHostName() string
func MustNewNameNode ¶ added in v0.4.0
func MustNewRRSet ¶ added in v0.4.0
Types ¶
type ResponseWriter ¶ added in v0.5.0
type ResponseWriter struct { LocalAddress net.Addr RemoteAddress net.Addr Msg *dns.Msg Msgs []*dns.Msg MsgBytes []byte ErrWriteMsg error ErrWrite error ErrClose error ErrTsigStatus error }
func (*ResponseWriter) Close ¶ added in v0.5.0
func (w *ResponseWriter) Close() error
Close closes the connection.
func (*ResponseWriter) Hijack ¶ added in v0.5.0
func (w *ResponseWriter) Hijack()
Hijack lets the caller take over the connection. After a call to Hijack(), the DNS package will not do anything with the connection.
func (*ResponseWriter) LocalAddr ¶ added in v0.5.0
func (w *ResponseWriter) LocalAddr() net.Addr
LocalAddr returns the net.Addr of the server
func (*ResponseWriter) RemoteAddr ¶ added in v0.5.0
func (w *ResponseWriter) RemoteAddr() net.Addr
RemoteAddr returns the net.Addr of the client that sent the current request.
func (*ResponseWriter) TsigStatus ¶ added in v0.5.0
func (w *ResponseWriter) TsigStatus() error
TsigStatus returns the status of the Tsig.
func (*ResponseWriter) TsigTimersOnly ¶ added in v0.5.0
func (w *ResponseWriter) TsigTimersOnly(bool)
TsigTimersOnly sets the tsig timers only boolean.
type TestGenerator ¶ added in v0.4.0
func (*TestGenerator) NewNameNode ¶ added in v0.4.0
func (n *TestGenerator) NewNameNode(name string, class dns.Class) (dnsutils.NameNodeInterface, error)
type TestNameNodeInterface ¶ added in v0.4.0
type TestNameNodeInterface struct {
NameNodeInterface dnsutils.NameNodeInterface
}
Click to show internal directories.
Click to hide internal directories.