Documentation
¶
Index ¶
Constants ¶
View Source
const ( DNS_MANAGER_STUB = "stub" // '/run/systemd/resolve/stub-resolv.conf' DNS_MANAGER_UPLINK = "uplink" // '/run/systemd/resolve/resolv.conf' DNS_MANAGER_RESOLVECONF = "resolveconf" // 'generated by resolvconf(8)' DNS_MANAGER_FILE = "file" // other than above DNS_MANAGER_WINDOWS_REGISTRY = "registry" // for Windows machines )
Variables ¶
View Source
var ( ErrNXDomain = errors.New("non existent domain") ErrNoQTypeRecord = errors.New("domain exists but no record matching the question type") )
Functions ¶
func InitDNSConfig ¶
func InitDNSConfig()
Entry point to read current DNS settings and write to config
Types ¶
type DNSResolver ¶
type DNSResolver struct {
DnsEntriesCacheStore map[string]dns.RR
DnsEntriesCacheMap map[string][]dnsRecord
}
var DnsResolver *DNSResolver
func (*DNSResolver) RegisterA ¶
func (d *DNSResolver) RegisterA(record dnsRecord) error
Register A record
func (*DNSResolver) RegisterAAAA ¶
func (d *DNSResolver) RegisterAAAA(record dnsRecord) error
Register AAAA record
Click to show internal directories.
Click to hide internal directories.