dns

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrAnswer

type AddrAnswer struct {
	At        time.Time
	Domain    string
	Addresses []Address
	Error     error
}

AddrAnswer -

type Address

type Address struct {
	TTL uint32 //time to live in seconds
	IP  net.IP
}

Address -

type AddressResolver

type AddressResolver interface {
	Ask(ctx context.Context, domain string, opts ...Option) AddrAnswer
}

AddressResolver address resolver interface

var (
	// QueryA -
	QueryA AddressResolver = queryAddress[typeA]{}

	// QueryAAAA -
	QueryAAAA AddressResolver = queryAddress[typeAAAA]{}

	// ErrNoAnyNs - no any nameserver is used
	ErrNoAnyNs = errors.New("no any nameserver is used")
)

type FromLocalAddr

type FromLocalAddr string

FromLocalAddr -

type NoDefNS

type NoDefNS struct{}

NoDefNS -

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option -

type UsePort

type UsePort uint16

UsePort -

type UseTCP

type UseTCP struct{}

UseTCP -

type WithBackoff

type WithBackoff struct {
	bkf.Backoff
}

WithBackoff -

type WithDialDuration

type WithDialDuration time.Duration

WithDialDuration -

type WithNameservers

type WithNameservers []string

WithNameservers -

type WithReadDuration

type WithReadDuration time.Duration

WithReadDuration -

type WithWriteDuration

type WithWriteDuration time.Duration

WithWriteDuration -

Jump to

Keyboard shortcuts

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