filter

package
v0.0.1-pre Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterMap

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

func Init

func Init() (*FilterMap, error)

func (*FilterMap) Add

func (f *FilterMap) Add(ips []net.IP) error

func (*FilterMap) Close

func (f *FilterMap) Close()

func (*FilterMap) Delete

func (f *FilterMap) Delete(ips []net.IP) error

type IEbpfMap

type IEbpfMap interface {
	BatchUpdate(keys, values interface{}, opts *ebpf.BatchOptions) (int, error)
	BatchDelete(keys interface{}, opts *ebpf.BatchOptions) (int, error)
	Put(key, value interface{}) error
	Delete(key interface{}) error
	Close() error
}

Interface for eBPF map. Added for UTs.

type IFilterMap

type IFilterMap interface {
	Add([]net.IP) error
	Delete([]net.IP) error
	Close()
}

A thin wrapper around the eBPF map that allows adding and deleting IPv4 addresses. Adding this separately here because: - C code uses the lib for generation/compilation - Plugins import retina_filter.c to use lookup function

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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