Documentation ¶
Overview ¶
Package dns contains utility functions for DNS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddServers ¶ added in v0.0.25
AddServers adds DNS servers to 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.