service

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

func NewCommonContainer

func NewCommonContainer() *Container

func (*Container) Execute

func (c *Container) Execute(ctx context.Context, w dns.ResponseWriter, msg *dns.Msg) (err error)

func (*Container) Register

func (c *Container) Register(handler plugin.Handler) error

type PluginContainer

type PluginContainer interface {
	Register(plugin.Handler) error
	// Execute run plugin.Handler.ServeDNS in order as it was added.
	// If error occurs, it exits immediately end return error.
	// If !dns.RcodeSuccess is returned, it exits immediately end return error.
	Execute(ctx context.Context, w dns.ResponseWriter, msg *dns.Msg) error
}

PluginContainer is keeps particular services in the container and executes them in order they were added

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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