check

package
v0.0.0-...-119eded Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Metrics struct {
	Queries uint64 // total amount of DNS queries

	Processed uint64 // total checks done
	Valid     uint64 // total checks with valid result
	Invalid   uint64 // total checks with invalid result

	DNSSecSupported    uint64 // valid results with dnssec
	DNSSecNotSupported uint64 // valid results without dnssec
}

Metrics holds runtime metrics

Functions

This section is empty.

Types

type Checker

type Checker struct {
	WorkersCount    uint
	ReferenceServer string
	MaxAttempts     uint
	Timeout         time.Duration
	GeoDbPath       string

	DNSClient dns.Client
	// contains filtered or unexported fields
}

Checker is a checker instance

func (*Checker) AddDomain

func (checker *Checker) AddDomain(domain string) bool

AddDomain adds a domain if it does not exist yet

func (*Checker) Enqueue

func (checker *Checker) Enqueue(id int, address string)

Enqueue adds a new job

func (*Checker) ReadDomains

func (checker *Checker) ReadDomains(path string) error

ReadDomains reads the domains to be checked from the given file

func (*Checker) Results

func (checker *Checker) Results() <-chan *Job

Results returns the results channel

func (*Checker) Start

func (checker *Checker) Start() error

Start checks the options and starts the check routines

func (*Checker) Stop

func (checker *Checker) Stop()

Stop closes input channel and waits for workers to finish

func (*Checker) UpdateExectations

func (checker *Checker) UpdateExectations() error

UpdateExectations checks the domain list against the references nameserver and saves the responses

type Job

type Job struct {
	ID      int
	Address string
	Name    string
	Version string
	State   string
	Err     string
	Country string
	City    string
	Dnssec  *bool
}

Job represents a nameserver check

Jump to

Keyboard shortcuts

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