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 PinByName = ciliumebpf.PinByName )
Variables ¶
var ( ErrKeyNotExist = ciliumebpf.ErrKeyNotExist LoadPinnedMap = ciliumebpf.LoadPinnedMap )
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 OpenMap ¶ added in v1.10.6
OpenMap opens the given bpf map and generates the Map object based on the information stored in the bpf map.
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