Documentation ¶
Overview ¶
Package exchanger provides DNS exchanger decorators and other utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Decorator ¶
A Decorator adds a layer of behaviour to a given Exchanger.
func ErrorLogging ¶
ErrorLogging returns a Decorator which logs an Exchanger's errors to the given logger.
func Instrumentation ¶
Instrumentation returns a Decorator which instruments an Exchanger with the given counter.
type Exchanger ¶
type Exchanger interface { // Exchange performs an synchronous query. It sends the message m to the address // contained in addr (host:port) and waits for a reply. Exchange(m *dns.Msg, addr string) (r *dns.Msg, rtt time.Duration, err error) }
Exchanger is an interface capturing a dns.Client Exchange method.
Click to show internal directories.
Click to hide internal directories.