Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "github.com/d3mondev/resolvermt" ) func main() { resolvers := []string{ "8.8.8.8", "9.9.9.10", "1.1.1.1", } domains := []string{ "www.google.com", "facebook.com", "uber.com", "apple.com", "blogger.com", "instagram.com", "linkedin.com", "en.wikipedia.org", "cloudflare.com", "wordpress.org", } client := resolvermt.New(resolvers, 3, 10, 5) defer client.Close() results := client.Resolve(domains, resolvermt.TypeA) for _, record := range results { fmt.Printf("%s %s %s\n", record.Question, record.Type, record.Answer) } }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Resolve(domains []string, rrtype RRtype) []Record QueryCount() int Close() }
Client is used to send DNS requests to resolvers concurrently.
type RRtype ¶
type RRtype uint16
RRtype resource record type.
const ( // TypeA A record TypeA RRtype = RRtype(dns.TypeA) // TypeAAAA AAAA record TypeAAAA RRtype = RRtype(dns.TypeAAAA) // TypeCNAME CNAME record TypeCNAME RRtype = RRtype(dns.TypeCNAME) // TypeTXT TXT record TypeTXT RRtype = RRtype(dns.TypeTXT) // TypeMX MX record TypeMX RRtype = RRtype(dns.TypeMX) // TypeNS NS record TypeNS RRtype = RRtype(dns.TypeNS) )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.