util/dnsname: add FQDN type, use throughout codebase.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-04-09 15:24:47 -07:00
committed by Dave Anderson
parent 7a1813fd24
commit 1a371b93be
13 changed files with 449 additions and 214 deletions

View File

@@ -8,6 +8,7 @@ import (
"errors"
"inet.af/netaddr"
"tailscale.com/util/dnsname"
)
// An OSConfigurator applies DNS settings to the operating system.
@@ -42,13 +43,13 @@ type OSConfig struct {
// SearchDomains are the domain suffixes to use when expanding
// single-label name queries. SearchDomains is additive to
// whatever non-Tailscale search domains the OS has.
SearchDomains []string
SearchDomains []dnsname.FQDN
// MatchDomains are the DNS suffixes for which Nameservers should
// be used. If empty, Nameservers is installed as the "primary" resolver.
// A non-empty MatchDomains requests a "split DNS" configuration
// from the OS, which will only work with OSConfigurators that
// report SupportsSplitDNS()=true.
MatchDomains []string
MatchDomains []dnsname.FQDN
}
// ErrGetBaseConfigNotSupported is the error