containersmap

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BPFMapName        = "containers"
	NameMaxLength     = common.NameMaxLength
	NameMaxCharacters = NameMaxLength - 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainersMap

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

ContainersMap creates a global map /sys/fs/bpf/gadget/containers exposing container details for each mount namespace.

This makes it possible for gadgets to access that information and display it directly from the BPF code. Example of such code:

struct container *container_entry;
container_entry = bpf_map_lookup_elem(&containers, &mntns_id);

External tools such as tracee or bpftrace could also benefit from this just by using this "containers" map (other interaction with Inspektor Gadget is not necessary for this).

func NewContainersMap

func NewContainersMap(pinPath string) (*ContainersMap, error)

func (*ContainersMap) Close

func (cm *ContainersMap) Close()

func (*ContainersMap) ContainersMap

func (cm *ContainersMap) ContainersMap() *ebpf.Map

func (*ContainersMap) ContainersMapUpdater

func (cm *ContainersMap) ContainersMapUpdater() containercollection.FuncNotify

Jump to

Keyboard shortcuts

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