authorizer

package
v0.0.0-...-f2271ba Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthorizer

func NewAuthorizer(
	ttl,
	ttlCheckTicker int,
	authorizedSet string,
	blacklistHosts, blacklistNetworks []string,
	doNotFlushAuthorizedHosts bool,
	fw *firewall.Firewall,
	logger *logrus.Logger) (*Authorizer, *ServiceContext, error)

NewAuthorizer for creating a new Authorizer

Types

type Authorizer

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

Authorizer for managing firewall rules

func (*Authorizer) HandleRequest

func (f *Authorizer) HandleRequest(resp *dns.Msg) error

HandleRequest for filtering dns respone requests

type ServiceContext

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

ServiceContext for canceling goroutins

func (*ServiceContext) Expire

func (f *ServiceContext) Expire()

Expire will call cancel to terminate a context immediately, causing the goroutine to exit

func (*ServiceContext) Wait

func (f *ServiceContext) Wait()

Wait ensures that the goroutine has exit successfully

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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