compat

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MntNsIdType     = "type:gadget_mntns_id"
	NetNsIdType     = "type:gadget_netns_id"
	NetNsIdFallback = "name:netns"
)

Variables

This section is empty.

Functions

func GetEventWrappers

func GetEventWrappers(gadgetCtx operators.GadgetContext) (map[datasource.DataSource]*EventWrapperBase, error)

GetEventWrappers checks for data sources containing refererences to mntns/netns that we could enrich data for

func Subscribe

func Subscribe(
	eventWrappers map[datasource.DataSource]*EventWrapperBase,
	mntNsEnrichFunc MntNsEnrichFunc,
	netNsEnrichFunc NetNsEnrichFunc,
	priority int,
)

Types

type EventWrapper

type EventWrapper struct {
	*EventWrapperBase
	Data datasource.Data
}

func (*EventWrapper) GetMountNSID

func (ev *EventWrapper) GetMountNSID() uint64

func (*EventWrapper) GetNetNSID

func (ev *EventWrapper) GetNetNSID() uint64

func (*EventWrapper) SetContainerMetadata

func (ev *EventWrapper) SetContainerMetadata(container types.Container)

func (*EventWrapper) SetNode

func (ev *EventWrapper) SetNode(node string)

func (*EventWrapper) SetPodMetadata

func (ev *EventWrapper) SetPodMetadata(container types.Container)

type EventWrapperBase

type EventWrapperBase struct {
	MntnsidAccessor datasource.FieldAccessor
	NetnsidAccessor datasource.FieldAccessor
	// contains filtered or unexported fields
}

func WrapAccessors

func WrapAccessors(source datasource.DataSource, mntnsidAccessor datasource.FieldAccessor, netnsidAccessor datasource.FieldAccessor) (*EventWrapperBase, error)

type MntNsEnrichFunc

type MntNsEnrichFunc func(event operators.ContainerInfoFromMountNSID)

type NetNsEnrichFunc

type NetNsEnrichFunc func(event operators.ContainerInfoFromNetNSID)

Jump to

Keyboard shortcuts

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