dns

package
v0.0.0-...-e1c190b Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package dns implements a DNS prober. It sends UDP DNS queries to a list of targets and reports statistics on queries sent, queries received, and latency experienced.

This prober uses the DNS library in /third_party/golang/dns/dns to construct, send, and receive DNS messages. Every message is sent on a different UDP port. Queries to each target are sent in parallel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Exchange(*dns.Msg, string) (*dns.Msg, time.Duration, error)
	SetReadTimeout(time.Duration)
}

Client provides a DNS client interface for required functionality. This makes it possible to mock.

type ClientImpl

type ClientImpl struct {
	dns.Client
}

ClientImpl is a concrete DNS client that can be instantiated.

func (*ClientImpl) SetReadTimeout

func (c *ClientImpl) SetReadTimeout(d time.Duration)

SetReadTimeout allows write-access to the underlying ReadTimeout variable.

type Probe

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

Probe holds aggregate information about all probe runs, per-target.

func (*Probe) Init

func (p *Probe) Init(name string, opts *options.Options) error

Init initializes the probe with the given params.

func (*Probe) Start

func (p *Probe) Start(ctx context.Context, dataChan chan *metrics.EventMetrics)

Start starts and runs the probe indefinitely.

Directories

Path Synopsis
Dns_bin implements a stand-alone dns prober binary using the cloudprober/probes/dns package.
Dns_bin implements a stand-alone dns prober binary using the cloudprober/probes/dns package.
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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