dnsserver

package
v0.5.26 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handlers = []string{
	"acl",
	"any",
	"as112",
	"chaos",
	"cookie",
	"dbfile",
	"dbhost",
	"dbsqlite",
	"drunk",
	"geoip",
	"log",
	"metrics",
	"msgcache",
	"nsid",
	"refuse",
	"sign",
	"template",
	"unpack",
	"url",
	"whoami",
	"yes",
}

Handlers is a slices of handler names.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	conffile.Dispenser
	Global *global.Global
}

Controller is used by handlers to parse their config.

func NewTestController

func NewTestController(input string) *Controller

NewTestController create a controller useful for tests.

func (*Controller) OnReset added in v0.5.15

func (c *Controller) OnReset(fn func())

func (*Controller) OnShutdown

func (c *Controller) OnShutdown(fn func() error)

func (*Controller) OnStartup

func (c *Controller) OnStartup(fn func() error)

OnStartup and OnShutdown can be used by handlers to register startup and shutdown functions. Each function is execute once during starting and shutting of the server. OnReset is called after OnShutdown to clear anything out that can prevent a clean reload, think sync.Once mutexes.

func (*Controller) Path added in v0.5.1

func (c *Controller) Path() string

func (*Controller) RemainingPaths added in v0.5.1

func (c *Controller) RemainingPaths() []string

Jump to

Keyboard shortcuts

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