Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context is used to switch resolvers (and test/mock)
type ErrorResolver ¶
type ErrorResolver struct{}
ErrorResolver always returns an error
func (ErrorResolver) LookupHost ¶
func (ErrorResolver) LookupHost(host string) ([]string, error)
LookupHost is for forward resolving
type NullResolver ¶
type NullResolver struct{}
NullResolver is empty
func (NullResolver) LookupHost ¶
func (NullResolver) LookupHost(host string) ([]string, error)
LookupHost is for forward resolving
type RealResolver ¶
type RealResolver struct{}
RealResolver will call the real one
func (RealResolver) LookupHost ¶
func (RealResolver) LookupHost(host string) ([]string, error)
LookupHost is for forward resolving
type Resolver ¶
type Resolver interface {
LookupHost(host string) ([]string, error)
LookupMX(addr string) ([]*net.MX, error)
LookupTXT(addr string) ([]string, error)
}
Resolver is the main interface we use
Click to show internal directories.
Click to hide internal directories.
