control

package module
v0.0.0-...-c5bd636 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 7 Imported by: 0

README

corednsctl

Project for both a Coredns plugin to enable remote control (read & write) and a CLI tool to interact with the server.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCliOperation

func RegisterCliOperation(c *caddy.Controller, cmds ...ControlCommand)

RegisterCliOperation is called by plugins to register new commands to be provided to the cli/api

Types

type CommandRegistry

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

CommandRegistry holds a list of all the commands that are registered.

func NewCommandRegistry

func NewCommandRegistry() (CommandRegistry, error)

NewCommandRegistry returns a new commandregistry for storing actions to perform

type ControlCommand

type ControlCommand struct {
}

type CoreControl

type CoreControl struct {
	Next plugin.Handler
	// contains filtered or unexported fields
}

CoreControl is our main struct to control the world of remote control

func New

func New() (CoreControl, error)

New provides a new CoreControl object, and starts the server

func (*CoreControl) Close

func (cc *CoreControl) Close()

Close the server down, should be handled when caddy turns off

func (*CoreControl) Name

func (cc *CoreControl) Name() string

Name is the name of the plugin

func (*CoreControl) RegisterCommand

func (cc *CoreControl) RegisterCommand(cmd ControlCommand)

func (*CoreControl) ServeDNS

func (cc *CoreControl) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

ServeDNS implements the Handler interface.

Jump to

Keyboard shortcuts

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