dns

package
v0.0.0-...-f4dfc87 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Network string        `json:"network" long:"dns-network" default:"udp"`
	Timeout time.Duration `json:"timeout" long:"dns-timeout" default:"2s"`

	Server   string        `json:"server" long:"server"`
	Interval time.Duration `json:"interval" long:"interval" default:"1s"`

	QueryType string `json:"query_type" long:"query-type" default:"A"`
	QueryName string `json:"query_name" long:"query-name" default:"www.google.com"`
}

func (Config) Worker

func (config Config) Worker() (worker.Worker, error)

type Query

type Query struct {

	// recv
	RTT   time.Duration
	Error error
	// contains filtered or unexported fields
}

func (Query) Answers

func (q Query) Answers() int

func (Query) Errors

func (q Query) Errors() int

func (Query) StatsFields

func (q Query) StatsFields() map[string]interface{}

func (Query) StatsID

func (q Query) StatsID() stats.ID

func (Query) StatsTime

func (q Query) StatsTime() time.Time

func (Query) String

func (q Query) String() string

type Worker

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

func (*Worker) ConfigSub

func (worker *Worker) ConfigSub(configSub *config.Sub) error

func (*Worker) Run

func (worker *Worker) Run() error

func (*Worker) StatsWriter

func (worker *Worker) StatsWriter(statsWriter *stats.Writer) error

Jump to

Keyboard shortcuts

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