Versions in this module Expand all Collapse all v1 v1.11.1 Jan 18, 2024 Changes in this version + const Namespace + var ErrOnce = errors.New("this plugin can only be used once per Server Block") + var SlimTimeBuckets = prometheus.ExponentialBuckets(0.00025, 10, 5) + var TimeBuckets = prometheus.ExponentialBuckets(0.00025, 2, 16) + func A(ctx context.Context, b ServiceBackend, zone string, state request.Request, ...) (records []dns.RR, truncated bool, err error) + func AAAA(ctx context.Context, b ServiceBackend, zone string, state request.Request, ...) (records []dns.RR, truncated bool, err error) + func BackendError(ctx context.Context, b ServiceBackend, zone string, rcode int, ...) (int, error) + func CNAME(ctx context.Context, b ServiceBackend, zone string, state request.Request, ...) (records []dns.RR, err error) + func ClientWrite(rcode int) bool + func Done(ctx context.Context) bool + func Error(name string, err error) error + func MX(ctx context.Context, b ServiceBackend, zone string, state request.Request, ...) (records, extra []dns.RR, err error) + func NS(ctx context.Context, b ServiceBackend, zone string, state request.Request, ...) (records, extra []dns.RR, err error) + func NextOrFailure(name string, next Handler, ctx context.Context, w dns.ResponseWriter, ...) (int, error) + func OriginsFromArgsOrServerBlock(args, serverblock []string) []string + func PTR(ctx context.Context, b ServiceBackend, zone string, state request.Request, ...) (records []dns.RR, err error) + func Register(name string, action caddy.SetupFunc) + func SOA(ctx context.Context, b ServiceBackend, zone string, state request.Request, ...) ([]dns.RR, error) + func SRV(ctx context.Context, b ServiceBackend, zone string, state request.Request, ...) (records, extra []dns.RR, err error) + func SplitHostPort(s string) (hosts []string, port string, err error) + func TXT(ctx context.Context, b ServiceBackend, zone string, state request.Request, ...) (records []dns.RR, truncated bool, err error) + type Handler interface + Name func() string + ServeDNS func(context.Context, dns.ResponseWriter, *dns.Msg) (int, error) + type HandlerFunc func(context.Context, dns.ResponseWriter, *dns.Msg) (int, error) + func (f HandlerFunc) Name() string + func (f HandlerFunc) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) + type Host string + func (h Host) MustNormalize() (string, error) + func (h Host) Normalize() string + func (h Host) NormalizeExact() []string + type Name string + func (n Name) Matches(child string) bool + func (n Name) Normalize() string + type Options struct + type Plugin func(Handler) Handler + type ServiceBackend interface + IsNameError func(err error) bool + Lookup func(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) + MinTTL func(state request.Request) uint32 + Records func(ctx context.Context, state request.Request, exact bool) ([]msg.Service, error) + Reverse func(ctx context.Context, state request.Request, exact bool, opt Options) ([]msg.Service, error) + Serial func(state request.Request) uint32 + Services func(ctx context.Context, state request.Request, exact bool, opt Options) ([]msg.Service, error) + type Zones []string + func (z Zones) Matches(qname string) string + func (z Zones) Normalize()