dns

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

README

DNS Probe

RFC: RFC1035


Timeout : 5sec 6.1.3.3 (5) https://tools.ietf.org/rfcmarkup?doc=1123#page-77

Documentation

Index

Constants

View Source
const Name = "dns"

Name of the probe

Variables

This section is empty.

Functions

func New

func New() probe.Probe

New returns a new Probe

Types

type Probe

type Probe struct {
	FQDN         string   `json:"fqdn"`         // IP or Hostname
	RecordType   string   `json:"recordtype"`   // Record Type to Lookup
	StrictAnswer bool     `json:"strictanswer"` // Attend uniquement la valeur
	NameServers  []string `json:"nameservers"`  // Send Request to a specified Nameserver
}

Probe struct. Json and yaml descriptor are used for json output

func (*Probe) GenerateTStepName

func (p *Probe) GenerateTStepName() string

GenerateTStepName return a tstep name if non existent

func (Probe) GetDefaultFrequency added in v0.6.0

func (Probe) GetDefaultFrequency() time.Duration

func (Probe) GetDefaultTimeout added in v0.6.0

func (Probe) GetDefaultTimeout() time.Duration

func (Probe) GetName

func (Probe) GetName() string

Return Probe Name

func (*Probe) Initialize

func (p *Probe) Initialize(step probe.StepProbe) error

Initialize Probe struct data

func (*Probe) Run

func (p *Probe) Run(timeout time.Duration) (probeReturns []probe.ProbeReturn)

Start the probe request

type ProbeAnswer

type ProbeAnswer struct {
	Answer       []string        `json:"answer"`
	TTL          uint32          `json:"ttl"`
	ResponseTime float64         `json:"responsetime"` // Reference Time Unit = Second
	Class        string          `json:"class"`
	Priority     int             `json:"priority"`
	Weight       int             `json:"weight"`
	Port         int             `json:"port"`
	Target       string          `json:"target"`
	Proto        string          `json:"proto"`
	ProbeInfo    probe.ProbeInfo `json:"probeinfo"`
}

ProbeAnswer is the returned result after query Every DNS Probe should have a different ProbeAnswer For now All in One

Jump to

Keyboard shortcuts

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