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

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