Documentation ¶
Index ¶
- Variables
- func CheckDomainDNSReady(ctx context.Context, domain string, validCNAMEs []string) bool
- func FindNSServers(ctx context.Context, domain string) ([]*net.NS, error)
- func IpAddrsToIPs(ipAddrs []net.IPAddr) []net.IP
- func NSHosts(ns []*net.NS) []string
- func SameIPs(a, b []net.IP) bool
- type DNSRequest
- type DNSResponse
- type DirectResolver
- type ErrCNAMEFound
- type ErrUnexpectedRequest
- type MockResolver
- type Resolver
- type RootResolver
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSuchHost = &net.DNSError{Err: "no such host", IsNotFound: true}
View Source
var (
Logger logger = term.DefaultTerm
)
View Source
var ResolverAt = DirectResolverAt
Functions ¶
func CheckDomainDNSReady ¶
The DNS is considered ready if the CNAME of the domain is pointing to the ALB domain and in sync OR if the A record of the domain is pointing to the same IP addresses of the ALB domain and in sync
Types ¶
type DNSRequest ¶
type DNSResponse ¶
type DirectResolver ¶
type DirectResolver struct {
NSServer string
}
func (DirectResolver) LookupCNAME ¶
func (DirectResolver) LookupIPAddr ¶
type ErrCNAMEFound ¶
type ErrCNAMEFound string
func (ErrCNAMEFound) CNAME ¶
func (e ErrCNAMEFound) CNAME() string
func (ErrCNAMEFound) Error ¶
func (e ErrCNAMEFound) Error() string
type ErrUnexpectedRequest ¶
type ErrUnexpectedRequest DNSRequest
func (ErrUnexpectedRequest) Error ¶
func (e ErrUnexpectedRequest) Error() string
type MockResolver ¶
type MockResolver struct {
Records map[DNSRequest]DNSResponse
}
func (MockResolver) LookupCNAME ¶
func (MockResolver) LookupIPAddr ¶
type Resolver ¶
type Resolver interface { LookupIPAddr(ctx context.Context, domain string) ([]net.IPAddr, error) LookupCNAME(ctx context.Context, domain string) (string, error) LookupNS(ctx context.Context, domain string) ([]*net.NS, error) }
func DirectResolverAt ¶
type RootResolver ¶
type RootResolver struct{}
func (RootResolver) LookupCNAME ¶
func (RootResolver) LookupIPAddr ¶
Click to show internal directories.
Click to hide internal directories.