plain

package
v2.0.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUpstreamResolversNotSet = errors.New("upstream resolvers not set")

Functions

This section is empty.

Types

type Dialer

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

func New

func New(settings Settings) (dial *Dialer, err error)

func (*Dialer) Dial

func (d *Dialer) Dial(ctx context.Context, network, _ string) (
	conn net.Conn, err error,
)

func (*Dialer) String

func (d *Dialer) String() string

type Metrics

type Metrics interface {
	PlainDialInc(address, outcome string)
}

type Settings

type Settings struct {
	// UpstreamResolvers is a list of plain DNS upstream resolvers
	// to use.
	UpstreamResolvers []provider.Provider
	// Timeout is the maximum duration to wait for a response from
	// upstream DNS servers. If left unset, it defaults to
	// 5 seconds.
	Timeout time.Duration
	// IPVersion defines the only IP version to use to connect to
	// upstream DNS servers. If left unset, it defaults to
	// "ipv4".
	IPVersion string
	// Metrics is the metrics interface to record metric data.
	// It defaults to a No-Op metrics implementation.
	Metrics Metrics
}

func (*Settings) SetDefaults

func (s *Settings) SetDefaults()

func (*Settings) String

func (s *Settings) String() string

func (*Settings) ToLinesNode

func (s *Settings) ToLinesNode() (node *gotree.Node)

func (Settings) Validate

func (s Settings) Validate() (err error)

type Warner

type Warner interface {
	Warn(s string)
}

Directories

Path Synopsis
metrics
noop
Package noop defines a No-Op metric implementation for DoT.
Package noop defines a No-Op metric implementation for DoT.
prometheus
Package prometheus defines a Prometheus metric implementation for DoT.
Package prometheus defines a Prometheus metric implementation for DoT.

Jump to

Keyboard shortcuts

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