service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithCookieSecret = func(key []byte) ServerOption {
	return func(s *server) {
		s.cookieSecret = key
	}
}
View Source
var WithGeoipDbPath = func(path string) ServerOption {
	return func(s *server) {
		s.geoipDbPath = path
	}
}

Functions

func New

func New(opts ...ServerOption) (*server, error)

Types

type Handler

type Handler interface {
	Handle(w dns.ResponseWriter, req, resp *dns.Msg)
}

func BadCookieHandler

func BadCookieHandler(clientCookie []byte, gen *cookies.CookieGenerator) Handler

func TSIGHanlder

func TSIGHanlder(domain string, next Handler) Handler

func ValidCookieHandler

func ValidCookieHandler(gen *cookies.CookieGenerator, next Handler) Handler

type HandlerFunc

type HandlerFunc func(w dns.ResponseWriter, req, resp *dns.Msg)

func (HandlerFunc) Handle

func (f HandlerFunc) Handle(w dns.ResponseWriter, req, resp *dns.Msg)

type ServerOption

type ServerOption func(*server)

Jump to

Keyboard shortcuts

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