Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeA = "A" TypeAAAA = "AAAA" TypeNS = "NS" TypeMX = "MX" TypeTXT = "TXT" TypeSRV = "SRV" TypeCNAME = "CNAME" TypePTR = "PTR" )
Variables ¶
Functions ¶
func Subdomains ¶
Subdomains returns list of subdomains of base domain. sub: a.b.c.d.com, base: d.com -> c.d.com, b.c.d.com, a.b.c.d.com
Types ¶
type Pool ¶ added in v0.2.0
type Pool struct {
// contains filtered or unexported fields
}
Pool represents Pool of DNS servers.
type Result ¶
type Result struct { // Name is a resolved DNS name. Name string // Answers is a map from Query type to list of results. Answers map[string][]string // Meta is a meta data copied from Task. Meta map[string]interface{} }
Result represents DNS resolver task result.
func (*Result) ResultType ¶
func (r *Result) ResultType()
ResultType allows Result to implement jobq.Result interface.
type Server ¶ added in v0.2.0
type Server struct { // IP address of the Server. IP net.IP // contains filtered or unexported fields }
Server represents DNS Server.
type Task ¶
type Task struct { // Name is a DNS name to resolve. Name string // Qtypes is a list of Query types to use. Qtypes []string // Meta is metadata which will be copied to result. Meta map[string]interface{} // contains filtered or unexported fields }
Task represents DNS resolver task.
type TaskGroup ¶
type TaskGroup interface { // Add adds task to group. Add(name string, qtypes []string, meta Meta) // Next returns next task Result or error. Next(*Result, *error) bool // Wait blocks until all tasks in group are processed. Wait() // Close closes all internal resources. // Blocks until all internal goroutines are stopped. Close() // Speed returns processing speed (tasks per second). Speed() float64 // Progress returns progress as number from 0 to 1. Progress() float64 }
TaskGroup represents group of DNS resolve to process.
Click to show internal directories.
Click to hide internal directories.