Documentation ¶
Index ¶
- type Checker
- func (c Checker) ExternalDNS(ctx context.Context, hostname string, externalDNS []string) error
- func (c Checker) HTTP(ctx context.Context, userAgent, hostname string, ...) ([]string, error)
- func (c Checker) NativeDNS(ctx context.Context, hostname string) (ips []string, err error)
- func (c Checker) Ports(ctx context.Context, ips []string, ports []int) (openPorts []int, err error)
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct { }
func (Checker) ExternalDNS ¶
ExternalDNS initiates the DNS resolution process by using an external DNS provider as the resolver.
func (Checker) HTTP ¶
func (c Checker) HTTP(ctx context.Context, userAgent, hostname string, customHeaders map[string]string, openPorts []int) ([]string, error)
HTTP sends an HTTP request to the open ports found on your hostname and returns back a list of URLs. It might be that no URLs are to be returned - in that case an out-of-scope error might be returned, or a HTTP timeout warning. In the case the user agent provided resulted in the request being blocked, then a relevant error is returned.
func (Checker) NativeDNS ¶
NativeDNS initializes the DNS resolution process by using the cluster-internal DNS resolvers.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver implements the Resolver interface and supports external DNS resolvers.
func NewResolver ¶
NewResolver generates and returns a Resolver pointer instance including any external DNS resolver configuration.
func NewResolverWithCheckers ¶
func NewResolverWithCheckers(externalDNS []string, checker endpointresolver.Checker) *Resolver
NewResolverWithCheckers generates and returns a Resolver pointer instance including any external DNS resolver configuration as well as injects a Checker interface implementation.
func (*Resolver) Resolve ¶
func (c *Resolver) Resolve(ctx context.Context, conf endpointresolver.ResolveConf) (urls []string, err error)
Resolve does a full resolution check by consequently executing open ports, DNS and HTTP checks. Returns back a list of valid URLs, or an error.