timelimit

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

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

Go to latest
Published: Dec 2, 2020 License: MIT Imports: 8 Imported by: 0

README

timelimit

Documentation

Overview

Package timelimit is a CoreDNS plugin that restricts certain dns resolutions during certain timeframes

It serves as a crude way of implementing parental controls for network devices

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeLimit

type TimeLimit struct {
	Next plugin.Handler
}

TimeLimit is an example plugin to show how to write a plugin.

func (TimeLimit) Name

func (tl TimeLimit) Name() string

Name implements the Handler interface.

func (TimeLimit) Ready

func (e TimeLimit) Ready() bool

Ready implements the ready.Readiness interface, once this flips to true CoreDNS assumes this plugin is ready for queries; it is not checked again.

func (TimeLimit) ServeDNS

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

ServeDNS implements the plugin.Handler interface. This method gets called when example is used in a Server.

Jump to

Keyboard shortcuts

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