ebpf

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetEbpfMap

func SetEbpfMap(m EbpfMap)

Types

type EbpfMap

type EbpfMap interface {
	// CreateAndPinArrayMap create map with default set of key/value data
	// only supports map of "array" type, pinning of "pingByName" type
	// dir is the base path to pin map
	// $dir/$name is the path to pin map
	// If the map already existed,
	CreateAndPinArrayMap(dir, name string, defaultKV []ebpf.MapKV) (err error)
	// UnpinArrayMap removes the persisted state for the map from the BPF virtual filesystem
	UnpinArrayMap(pinPath string) (err error)
	// LookUpMapValue looks up the value of the key
	LookUpMapValue(pinPath string, key, value interface{}) (err error)
	// UpdateMapValue updates the value of the key
	UpdateMapValue(pinPath string, key, value interface{}) (err error)
}

EbpfMap is an interface of ebpf map options.

func GetEbpfMap

func GetEbpfMap() EbpfMap

type Map

type Map struct{}

func (*Map) CreateAndPinArrayMap

func (m *Map) CreateAndPinArrayMap(dir, name string, defaultKV []ebpf.MapKV) (err error)

func (*Map) LookUpMapValue

func (m *Map) LookUpMapValue(pinPath string, key, value interface{}) (err error)

func (*Map) UnpinArrayMap

func (m *Map) UnpinArrayMap(pinPath string) (err error)

func (*Map) UpdateMapValue

func (m *Map) UpdateMapValue(pinPath string, key, value interface{}) (err error)

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