Documentation ¶
Overview ¶
Package ebpf provides functions that allow golang programs to interact with ebpf maps by wrapping the cilium/ebpf library. +groupName=pkg
Index ¶
Constants ¶
const ( PerCPUHash = ciliumebpf.PerCPUHash Array = ciliumebpf.Array HashOfMaps = ciliumebpf.HashOfMaps LPMTrie = ciliumebpf.LPMTrie PinByName = ciliumebpf.PinByName )
Variables ¶
var (
ErrKeyNotExist = ciliumebpf.ErrKeyNotExist
)
Functions ¶
func GetOpenMaps ¶
GetOpenMaps returns a slice of all open BPF maps. This is identical to calling GetMap() on all open maps.
Types ¶
type IterateCallback ¶
type IterateCallback func(key, value interface{})
IterateCallback represents the signature of the callback function expected by the IterateWithCallback method, which in turn is used to iterate all the keys/values of a map.
type Map ¶
type Map struct { *ciliumebpf.Map // contains filtered or unexported fields }
Map represents an eBPF map.
func LoadPinnedMap ¶
LoadPinnedMap wraps cilium/ebpf's LoadPinnedMap.
func LoadRegisterMap ¶
LoadRegisterMap loads the specified map from a bpffs pin path and registers its handle in the package-global map register.
func (*Map) IterateWithCallback ¶
func (m *Map) IterateWithCallback(key, value interface{}, cb IterateCallback) error
IterateWithCallback iterates through all the keys/values of a map, passing each key/value pair to the cb callback.
func (*Map) OpenOrCreate ¶
OpenOrCreate tries to open or create the eBPF map identified by the spec in the Map object.
type MapSpec ¶
type MapSpec = ciliumebpf.MapSpec