# Functions
DefaultDNSConfig returns the default DNS configuration.
No description provided by the author
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.
No description provided by the author
No description provided by the author
NewHostnameTrie returns a pointer to a new HostnameTrie or an error if the input is incorrect.
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.
No description provided by the author
NewNullHostnameTrie returns a NullHostnameTrie encapsulating HostnameTrie or an error if the input is incorrect.
No description provided by the author
No description provided by the author
NullDurationFrom returns a new valid NullDuration from a time.Duration.
No description provided by the author
No description provided by the author
No description provided by the author
ParseExtendedDuration is a helper function that allows for string duration values containing days.
Ensures color is a valid hex color.
# Constants
No description provided by the author
No description provided by the author
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.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# 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.
IPPool represent a slice of IPBlocks.
No description provided by the author
No description provided by the author
No description provided by the author
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.
No description provided by the author
NullHostnameTrie is a nullable HostnameTrie, in the same vein as the nullable types provided by package gopkg.in/guregu/null.v3.
NullIPPool is a nullable IPPool.
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
DNSPolicy specifies the preference for handling IP versions in DNS resolutions.go:generate enumer -type=DNSPolicy -trimprefix DNS -output dns_policy_gen.go.
DNSSelect is the strategy to use when picking a single IP if more than one is returned for a host name.go:generate enumer -type=DNSSelect -trimprefix DNS -output dns_select_gen.go.
Duration is an alias for time.Duration that de/serialises to JSON as human-readable strings.