dns

package
v0.0.0-...-9d84d00 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package dns implements a DNS forwarder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Mux *dns.ServeMux
	// contains filtered or unexported fields
}

func NewServer

func NewServer(addr, domain string) *Server

func (*Server) DyndnsHandler

func (s *Server) DyndnsHandler(w http.ResponseWriter, r *http.Request)

func (*Server) PrometheusHandler

func (s *Server) PrometheusHandler() http.Handler

func (*Server) SetAliases

func (s *Server) SetAliases(aliases map[string]string)

SetAliases replaces the alias table. Each entry maps a logical name (e.g. "mqtt") to a DHCP hostname (e.g. "dr") that is resolved through the regular DHCP-lease lookup at query time. A nil or empty map clears all aliases.

func (*Server) SetLeases

func (s *Server) SetLeases(leases []dhcp4d.Lease)

Jump to

Keyboard shortcuts

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