prefilter

package
v1.16.0-pre.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Overview

Package prefilter provides a means of configuring XDP pre-filters for DDoS-mitigation.

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"prefilter",
	"Provides a means of configuring XDP pre-filters for DDoS-mitigation",

	cell.Provide(NewPreFilter),
)

Cell provides prefilter, a means of configuring XDP pre-filters for DDoS-mitigation.

Functions

func NewPreFilter

func NewPreFilter(config *option.DaemonConfig, lifecycle cell.Lifecycle) types.PreFilter

NewPreFilter returns prefilter handle

Types

type PreFilter

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

PreFilter holds global info on related CIDR maps participating in prefilter

func (*PreFilter) Delete

func (p *PreFilter) Delete(revision int64, cidrs []net.IPNet) error

Delete deletes slice of CIDRs (doh!) for the latest revision

func (*PreFilter) Dump

func (p *PreFilter) Dump(to []string) ([]string, int64)

Dump dumps revision and CIDRs as string slice of all participating maps

func (*PreFilter) Enabled

func (p *PreFilter) Enabled() bool

func (*PreFilter) Insert

func (p *PreFilter) Insert(revision int64, cidrs []net.IPNet) error

Insert inserts slice of CIDRs (doh!) for the latest revision

func (*PreFilter) WriteConfig

func (p *PreFilter) WriteConfig(fw io.Writer)

WriteConfig dumps the configuration for the corresponding header file

Jump to

Keyboard shortcuts

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