dnsquery

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchmarker

type Benchmarker struct {
	Config  *config.Config
	Results *analysis.BenchmarkResults
	Limiter *rate.Limiter
	// ProgressWriter, when non-nil, receives an in-place progress line during
	// Run (intended for an interactive stderr). Nil disables progress output.
	ProgressWriter io.Writer
	// contains filtered or unexported fields
}

Benchmarker manages the benchmarking process.

func NewBenchmarker

func NewBenchmarker(cfg *config.Config) *Benchmarker

NewBenchmarker creates a new Benchmarker instance.

func (*Benchmarker) Close added in v1.6.0

func (b *Benchmarker) Close()

Close releases benchmark-scoped resources.

func (*Benchmarker) Run

Run performs the benchmark against the configured servers. Cancelling ctx stops the benchmark early; results collected so far remain valid, with the unattempted queries recorded as skipped.

type QueryOutcome added in v1.6.0

type QueryOutcome string

QueryOutcome classifies the outcome of a DNS query attempt.

const (
	OutcomeSuccess    QueryOutcome = "success"
	OutcomeDNSFailure QueryOutcome = "dns_failure"
	OutcomeTimeout    QueryOutcome = "timeout"
	OutcomeTransport  QueryOutcome = "transport_error"
	OutcomeMalformed  QueryOutcome = "malformed_response"
)

type QueryResult

type QueryResult struct {
	Latency  time.Duration
	Response *dns.Msg
	Error    error
}

QueryResult holds the result of a single DNS query.

type ResponseValidationError added in v1.6.0

type ResponseValidationError struct {
	Reason string
}

ResponseValidationError indicates a DNS response failed structural validation (wrong ID, missing Response bit, question mismatch, etc.).

func (*ResponseValidationError) Error added in v1.6.0

func (e *ResponseValidationError) Error() string

Jump to

Keyboard shortcuts

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