Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DigOne ¶
func DigOne(ctx context.Context, p DigOneParams) ([]string, error)
DigOne a qname! Returns an error for rcode != NOERROR or an empty list of answers. Returns answers sorted alphabetically. If there is both a context deadline and a configured timeout on `DigOneParams`, the earliest of the two takes effect.
Types ¶
type DigOneFunc ¶
type DigOneFunc func(ctx context.Context, p DigOneParams) ([]string, error)
func DigOneFuncMock ¶
func DigOneFuncMock(_ context.Context, rets []DigOneResult) DigOneFunc
type DigOneFuncCtxKey ¶ added in v0.0.11
type DigOneFuncCtxKey struct{}
type DigOneParams ¶
type DigOneParams struct { NameserverIPPort string Proto string Qname string Rtype uint16 SubnetIP net.IP Timeout time.Duration }
func EmptyDigOneparams ¶
func EmptyDigOneparams() DigOneParams
type DigOneResult ¶
type DigRepeatParams ¶
type DigRepeatParams struct { DigOneParams DigOneParams Count int }
func CombineDigRepeatParams ¶ added in v0.0.8
func CombineDigRepeatParams(nameservers []string, proto string, qnames []string, rtypes []uint16, subnets []net.IP, count int) []DigRepeatParams
CombineDigRepeatParams combines all the slcies passed. Ensure all of them have a length > 0
type DigRepeatResult ¶
type DigRepeatResult struct { Answers []counter.StringSliceCount Errors []counter.StringCount }
func DigRepeat ¶
func DigRepeat(ctx context.Context, p DigRepeatParams, dig DigOneFunc) DigRepeatResult
DigRepeat runs DigOne multiple times and sums the answers and errors
func DigRepeatParallel ¶ added in v0.0.7
func DigRepeatParallel(ctx context.Context, params []DigRepeatParams, dig DigOneFunc) []DigRepeatResult
DigRepeatParallel runs DigRepeats in parallel and returns a slice of their results
Click to show internal directories.
Click to hide internal directories.