boost

package module
v0.0.0-...-ecc79dc Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ans

type Ans struct {
	net.IP
	dns.RR
}

type Boost

type Boost struct {
	Debug bool
	Next  plugin.Handler
	Zones []string

	RankOptions
}

func New

func New() *Boost

func (*Boost) Name

func (b *Boost) Name() string

func (*Boost) ServeDNS

func (b *Boost) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

type MeasureMethod

type MeasureMethod func(b *Boost, in []Ans, out *Ans) (ok bool)

type Method

type Method int
const (
	MethodPing Method = iota
)

type RankOptions

type RankOptions struct {
	Method

	// Ping related options
	PingCount    int
	PingInterval time.Duration
	PingTimeout  time.Duration
}

type ResponseWriter

type ResponseWriter struct {
	dns.ResponseWriter

	*Boost
	// contains filtered or unexported fields
}

func (*ResponseWriter) Write

func (w *ResponseWriter) Write(buf []byte) (int, error)

func (*ResponseWriter) WriteMsg

func (w *ResponseWriter) WriteMsg(res *dns.Msg) error

Jump to

Keyboard shortcuts

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