fastip

package
v0.0.0-...-9e8a4c4 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPingWaitTimeout = 1 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type FastestAddr

type FastestAddr struct {
	PingWaitTimeout time.Duration
	// contains filtered or unexported fields
}

func NewFastestAddr

func NewFastestAddr(config *FastestAddrConfig) (f *FastestAddr, err error)

func (*FastestAddr) ExchangeFastest

func (f *FastestAddr) ExchangeFastest(req *dns.Msg, ups []upstream.Upstream) (
	resp *dns.Msg,
	u upstream.Upstream,
	err error,
)

type FastestAddrConfig

type FastestAddrConfig struct {
	PingWaitTimeout time.Duration
	PingPorts       []uint
}

Jump to

Keyboard shortcuts

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