dns

package
v1.33.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dns is the dns action: it asks a DNS server for the records of a name, and returns what the server answered.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Request

func Request(with map[string]any, opts ...Option) (map[string]any, error)

Request sends the query that with describes and returns the step's result. A server that answers with an error, such as NXDOMAIN, is a result for the step's test to check, and a server that does not answer is an error.

func Spec added in v1.30.0

func Spec() actionspec.Spec

Spec declares the dns action. It keeps to every kind of guard: a query writes nothing, and it is sent only to a server the guard allows. It cannot run without name.

Types

type Action

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

func (*Action) Run

func (a *Action) Run(with map[string]any) (map[string]any, error)

func (*Action) RunStep

func (a *Action) RunStep(call actionrpc.Call) (map[string]any, map[string]any, error)

RunStep sends the query under the guard of the run, which may allow only some hosts.

type Option

type Option func(*Req)

func WithGuard

func WithGuard(guard actionrpc.Guard) Option

WithGuard has the query sent only to a server the guard of the run allows.

type Req

type Req struct {
	Name     string `map:"name"`
	Type     string `map:"type"`
	Server   string `map:"server"`
	Protocol string `map:"protocol"`
	Timeout  string `map:"timeout"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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