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
Click to show internal directories.
Click to hide internal directories.