template

package module
v0.0.0-...-5a12247 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 9 Imported by: 0

README

CoreDNS Plugin Template

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateConfig

type TemplateConfig struct {
	Foo string `cf:"foo" check:"nonempty"`
	Bar string `cf:"bar" default:"Hello World"`
}

func ParseConfig

func ParseConfig(c *caddy.Controller) (*TemplateConfig, error)

type TemplatePlugin

type TemplatePlugin struct {
	Next plugin.Handler
	Cfg  TemplateConfig
}

func CreatePlugin

func CreatePlugin(c *caddy.Controller) (*TemplatePlugin, error)

func (TemplatePlugin) Name

func (p TemplatePlugin) Name() string

func (TemplatePlugin) ServeDNS

func (p TemplatePlugin) ServeDNS(ctx context.Context, writer dns.ResponseWriter, msg *dns.Msg) (int, error)

func (TemplatePlugin) ServeDnsRequest

func (p TemplatePlugin) ServeDnsRequest(ctx context.Context, state request.Request) (int, error)

Jump to

Keyboard shortcuts

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