mock

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

Writer type.

func NewWriter

func NewWriter(proto, addr string) *Writer

NewWriter return writer.

func (*Writer) Close

func (w *Writer) Close() error

(*Writer).Close close func.

func (*Writer) Internal

func (w *Writer) Internal() bool

(*Writer).Internal internal func.

func (*Writer) LocalAddr

func (w *Writer) LocalAddr() net.Addr

(*Writer).LocalAddr localAddr func.

func (*Writer) Msg

func (w *Writer) Msg() *dns.Msg

(*Writer).Msg msg return current dns message.

func (*Writer) Proto

func (w *Writer) Proto() string

(*Writer).Proto proto func.

func (*Writer) Rcode

func (w *Writer) Rcode() int

(*Writer).Rcode rcode return message response code.

func (*Writer) RemoteAddr

func (w *Writer) RemoteAddr() net.Addr

(*Writer).RemoteAddr remoteAddr func.

func (*Writer) RemoteIP

func (w *Writer) RemoteIP() net.IP

(*Writer).RemoteIP remoteIP func.

func (*Writer) Size added in v1.8.0

func (w *Writer) Size() int

(*Writer).Size reports the response's wire length: exact for a raw write, computed from the message otherwise.

func (*Writer) Write

func (w *Writer) Write(b []byte) (int, error)

(*Writer).Write write func.

func (*Writer) WriteMsg

func (w *Writer) WriteMsg(msg *dns.Msg) error

(*Writer).WriteMsg writeMsg func.

func (*Writer) Written

func (w *Writer) Written() bool

(*Writer).Written written func.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL