dnsutils

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package dnsutils provides dns specific utils functions and packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(ctx context.Context, handler Handler, listenOn string)

ListenAndServe starts dns server with specific handler. Listens both udp/tcp networks. ctx is using for keeping the server alive. As soon as <-ctx.Done() happens it stops dns server. handler is using for hanlding dns queries. listenOn is using for listen. Expects {ip}:{port} to listen. Examples: "127.0.0.1:53", ":53".

Types

type Handler

type Handler interface {
	ServeDNS(ctx context.Context, rp dns.ResponseWriter, m *dns.Msg)
}

Handler handles dns queries

Directories

Path Synopsis
Package adapt provides possible to adapt dns.Handler to dnsutils.Handler
Package adapt provides possible to adapt dns.Handler to dnsutils.Handler
Package connect simply connects to the concrete endpoint
Package connect simply connects to the concrete endpoint
Package fanout sends incoming queries in parallel to few endpoints
Package fanout sends incoming queries in parallel to few endpoints
Package memory provides a/aaaa memory storage Code generated by "-output sync_map.gen.go -type Map<string,[]net.IP> -output sync_map.gen.go -type Map<string,[]net.IP>"; DO NOT EDIT.
Package memory provides a/aaaa memory storage Code generated by "-output sync_map.gen.go -type Map<string,[]net.IP> -output sync_map.gen.go -type Map<string,[]net.IP>"; DO NOT EDIT.
Package next allows to dns handlers be joined into chain
Package next allows to dns handlers be joined into chain
Package noloop prevents loops
Package noloop prevents loops
Package norecursion disables recursion for the incomming query.
Package norecursion disables recursion for the incomming query.

Jump to

Keyboard shortcuts

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