checkresolv

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NetResolvedIP   event.Code = 10012
	NetUnresolvedIP event.Code = 10013
)

Event registered codes

View Source
const ActionClass = "checkresolv"

ActionClass defines action name

Variables

This section is empty.

Functions

func Builder

func Builder() builder.BuildActionFn

Builder returns a builder function

Types

type Action

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

Action checks ip addresses against an xlist service

func New

func New(aname string, checkers []dnsutil.ResolvChecker, cfg Config, l yalogi.Logger) (*Action, error)

New returns a new instance

func (*Action) Class

func (a *Action) Class() string

Class implements ipp.Action interface

func (*Action) Name

func (a *Action) Name() string

Name implements ipp.Action interface

func (*Action) PluginClass

func (a *Action) PluginClass() string

PluginClass implements ipp.Action interface

func (*Action) Register

func (a *Action) Register(hooks *ipp.Hooks)

Register implements ipp.Action interface

type Config

type Config struct {
	LocalNets []*net.IPNet
	//rules
	WhenResolved   Rule
	WhenUnresolved Rule
	OnError        nfqueue.Verdict
}

Config stores configuration for action

type Rule

type Rule struct {
	EventRaise bool
	EventLevel event.Level
	Verdict    nfqueue.Verdict
	Log        bool
}

Rule stores information

Jump to

Keyboard shortcuts

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