Documentation ¶ Index ¶ type Dial type Exchange func NewExchange(name string, dial Dial, warner Warner) Exchange type Handler func New(ctx context.Context, exchange Exchange, logger Logger) *Handler func (h *Handler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) type Logger type Warner Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Dial ¶ type Dial = func(ctx context.Context, _, _ string) (net.Conn, error) type Exchange ¶ type Exchange = func(ctx context.Context, request *dns.Msg) ( response *dns.Msg, err error, ) func NewExchange ¶ func NewExchange(name string, dial Dial, warner Warner) Exchange type Handler ¶ type Handler struct { // contains filtered or unexported fields } func New ¶ func New(ctx context.Context, exchange Exchange, logger Logger) *Handler func (*Handler) ServeDNS ¶ func (h *Handler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) type Logger ¶ type Logger interface { Debug(s string) Info(s string) Warner Error(s string) } type Warner ¶ type Warner interface { Warn(s string) } Source Files ¶ View all Source files exchange.go handler.go interfaces.go Click to show internal directories. Click to hide internal directories.