dns

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 13 Imported by: 0

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 Keeps

func Keeps() []string

Keeps returns the kinds of guard the dns action keeps to: a query writes nothing, and it is sent only to a server the guard allows.

func Params

func Params() []string

Params returns the keys the dns action takes in with.

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 Serve

func Serve()

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