dns

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("no records found")
)

Functions

func GetDNSServers

func GetDNSServers() (nameservers []netip.AddrPort)

Types

type Options

type Options struct {
	// dns server for querying
	AddrPort string
	Valid    time.Duration
}

type Resolver

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

func NewResolver

func NewResolver(option Options) (*Resolver, error)

func (*Resolver) Lookup

func (r *Resolver) Lookup(ctx context.Context, host string) ([]string, error)

Jump to

Keyboard shortcuts

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