# Functions
DefaultDNSConfig returns the default DNS configuration.
DNSPolicyString retrieves an enum value from the enum constants string name.
DNSPolicyValues returns all values of the enum.
DNSSelectString retrieves an enum value from the enum constants string name.
DNSSelectValues returns all values of the enum.
GetDurationValue is a helper function that can convert a lot of different types to time.Duration.
NewHost creates a pointer to a new address with an IP object.
NewHostnameTrie returns a pointer to a new HostnameTrie or an error if the input is incorrect.
NewHosts returns new Hosts from given addresses.
NewIPPool returns an IPPool slice from the provided string representation that should be comma separated list of IPs, IP ranges(ip1-ip2) and CIDRs.
NewNullDuration is a simple helper constructor function.
NewNullHostnameTrie returns a NullHostnameTrie encapsulating HostnameTrie or an error if the input is incorrect.
NewNullHosts returns valid (Valid: true) Hosts.
NullDurationFrom returns a new valid NullDuration from a time.Duration.
ParseExtendedDuration is a helper function that allows for string duration values containing days.
# Constants
DNSany returns any resolved address regardless of version.
DNSfirst returns the first IP from the response.
DNSonlyIPv4 only returns an IPv4 address and the resolution will fail if no IPv4 address is found.
DNSonlyIPv6 only returns an IPv6 address and the resolution will fail if no IPv6 address is found.
DNSpreferIPv4 returns an IPv4 address if available, falling back to IPv6 otherwise.
DNSpreferIPv6 returns an IPv6 address if available, falling back to IPv4 otherwise.
DNSrandom returns a random IP from the response.
DNSroundRobin rotates the IP returned on each lookup.
# Structs
DNSConfig is the DNS resolver configuration.
HostnameTrie is a tree-structured list of hostname matches with support for wildcards exclusively at the start of the pattern.
Hosts is wrapper around trieNode to integrate with net.TCPAddr.
IPPool represent a slice of IPBlocks.
NullDNSPolicy is a nullable wrapper around DNSPolicy, required for the current configuration system.
NullDNSSelect is a nullable wrapper around DNSSelect, required for the current configuration system.
NullDuration is a nullable Duration, in the same vein as the nullable types provided by package gopkg.in/guregu/null.v3.
NullHostnameTrie is a nullable HostnameTrie, in the same vein as the nullable types provided by package gopkg.in/guregu/null.v3.
NullHosts is a wrapper around Hosts like guregu/null.
NullIPPool is a nullable IPPool.
# Type aliases
DNSPolicy specifies the preference for handling IP versions in DNS resolutions.
DNSSelect is the strategy to use when picking a single IP if more than one is returned for a host name.
Duration is an alias for time.Duration that de/serialises to JSON as human-readable strings.
Host stores information about IP and port for a host.