resolver

package
v0.0.0-...-bca3330 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultBootstrapServers

func DefaultBootstrapServers() []string

func DefaultNumWorkers

func DefaultNumWorkers() int

func DefaultTimeout

func DefaultTimeout() time.Duration

func DefaultUpstreamServers

func DefaultUpstreamServers() []string

Types

type DNSType

type DNSType int

type Option

type Option func(r *Resolver)

func WithBootstrapServers

func WithBootstrapServers(servers []string) Option

func WithNumWorkers

func WithNumWorkers(numWorkers int) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

func WithUpstreamServers

func WithUpstreamServers(servers []string) Option

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver() *Resolver

func (*Resolver) Init

func (r *Resolver) Init() error

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, domains <-chan string, results chan<- Result)

func (*Resolver) WithOptions

func (r *Resolver) WithOptions(opts ...Option) *Resolver

type Result

type Result struct {
	IPs []net.IP
	Err error
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL