Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exchanger ¶
type Exchanger interface { Exchange(ctx context.Context, msg []byte) ([]byte, error) String() string }
Exchanger is an interface for DNS synchronous query.
func NewExchanger ¶
NewExchanger create an Exchanger. The addr should be URL-like format, e.g. udp://1.1.1.1:53, tls://1.1.1.1:853, https://1.0.0.1/dns-query
type Option ¶
type Option func(opts *Options)
Option allows a common way to set Exchanger options.
func LoggerOption ¶
LoggerOption sets the logger for Exchanger.
func RouterOption ¶
RouterOption sets the router for Exchanger.
func TLSConfigOption ¶
TLSConfigOption sets the TLS config for Exchanger.
func TimeoutOption ¶
TimeoutOption sets the timeout for Exchanger.
Click to show internal directories.
Click to hide internal directories.