meshdns

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package meshdns contains the Mesh DNS server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// UDPListenAddr is the UDP address to listen on.
	UDPListenAddr string
	// TCPListenAddr is the TCP address to listen on.
	TCPListenAddr string
	// TSIGKey is the TSIG key to use for DNS updates.
	TSIGKey string
	// ReusePort enables SO_REUSEPORT on the listeners.
	// TODO: not implemented yet
	ReusePort int
	// Compression enables DNS compression.
	Compression bool
	// Domain is the DNS domain to serve.
	Domain string
	// RequestTimeout is the timeout for DNS requests.
	// Defaults to 5 seconds.
	RequestTimeout time.Duration
}

Options are the Mesh DNS server options.

type Server

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

func NewServer

func NewServer(store meshdb.Store, o *Options) *Server

NewServer returns a new Mesh DNS server.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

ListenAndServe serves the Mesh DNS server.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown shuts down the Mesh DNS server.

Jump to

Keyboard shortcuts

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