Documentation
¶
Overview ¶
Package resolve is used to handle resolving records It also handles wildcard urls and rotating resolvers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultResolvers = []string{
"1.1.1.1:53",
"1.0.0.1:53",
"8.8.8.8:53",
"8.8.4.4:53",
"9.9.9.9:53",
"9.9.9.10:53",
"77.88.8.8:53",
"77.88.8.1:53",
"208.67.222.222:53",
"208.67.220.220:53",
}
DefaultResolvers contains the default list of resolvers known to be good
Functions ¶
This section is empty.
Types ¶
type ResolutionPool ¶
type ResolutionPool struct { *Resolver Tasks chan HostEntry Results chan Result // contains filtered or unexported fields }
ResolutionPool is a pool of resolvers created for resolving urls for a given host.
func (*ResolutionPool) InitWildcards ¶
func (r *ResolutionPool) InitWildcards(url string) error
InitWildcards inits the wildcard ips array
type Resolver ¶
Resolver is a struct for resolving DNS names
func (*Resolver) NewResolutionPool ¶
func (r *Resolver) NewResolutionPool(workers int, removeWildcard bool) *ResolutionPool
NewResolutionPool creates a pool of resolvers for resolving url
type Result ¶
type Result struct { Type ResultType Host string IP string Error error Source string }
Result contains the result for a host resolution
type ResultType ¶
type ResultType int
ResultType is the type of result found
const ( Url ResultType = iota Error )
Types of data result can return
Click to show internal directories.
Click to hide internal directories.