Documentation
¶
Overview ¶
Package dns contains utility functions for DNS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSearchDomains ¶ added in v0.13.8
AddSearchDomains adds DNS search domains to the system configuration. On Windows the interface name is required.
func AddServers ¶
AddServers adds DNS servers to the system configuration. On Windows the interface name is required.
func RemoveSearchDomains ¶ added in v0.13.8
RemoveSearchDomains removes DNS search domains from the system configuration. On Windows the interface name is required.
Types ¶
type DNSConfig ¶
type DNSConfig struct {
// Servers is the list of DNS servers to use.
Servers []string
// Search is the list of search domains to use.
Search []string
// Ndots is the number of dots required for absolute name.
Ndots int
// Timeout is the DNS timeout.
Timeout time.Duration
// Attempts is the number of DNS attempts.
Attempts int
// UseTCP indicates whether to use TCP for DNS.
UseTCP bool
}
DNSConfig is a configuration for performing DNS lookups.
func GetSystemConfig ¶
func GetSystemConfig() DNSConfig
GetSystemConfig returns the system DNS configuration.
Click to show internal directories.
Click to hide internal directories.