Documentation
¶
Overview ¶
Package resolver provides a caching, non-blocking DNS resolver. All requests for cached resources are returned immediately and if cache has expired, an offline goroutine is fired to update it.
Package resolver provides a caching, non-blocking DNS resolver. All requests for cached resources are returned immediately and if cache has expired, an offline goroutine is fired to update it.
Index ¶
- Constants
- func New(opts ...Option) *resolverImpl
- func ParseOverrideAddress(dnsResolverOverride string) (string, string, error)
- type Option
- func GetResolverOptions(targetsDef *targetspb.TargetsDef, l *logger.Logger) ([]Option, error)
- func WithDNSServer(serverNetworkOverride, serverAddressOverride string) Option
- func WithLogger(l *logger.Logger) Option
- func WithMaxTTL(ttl time.Duration) Option
- func WithResolveFunc(resolveFunc func(context.Context, string, string) ([]net.IP, error)) Option
- func WithResolveTimeout(resolveTimeout time.Duration) Option
- func WithTTL(ttl time.Duration) Option
- type Resolver
Constants ¶
View Source
const ( IP ipVersion = 0 IP4 ipVersion = 4 IP6 ipVersion = 6 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶ added in v0.13.8
type Option func(*resolverImpl)
func GetResolverOptions ¶ added in v0.13.8
func WithDNSServer ¶ added in v0.13.8
func WithLogger ¶ added in v0.13.8
func WithMaxTTL ¶ added in v0.13.8
func WithResolveFunc ¶ added in v0.13.8
func WithResolveTimeout ¶ added in v0.13.8
Click to show internal directories.
Click to hide internal directories.