types

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerLabelKeyPodName      = "io.kubernetes.pod.name"
	ContainerLabelKeyPodNamespace = "io.kubernetes.pod.namespace"
	ContainerLabelKeyPodUid       = "io.kubernetes.pod.uid"
)

Variables

View Source
var ErrDeviceNotFound = errors.New("device not found")

Functions

func ParseContainerLabels added in v0.10.0

func ParseContainerLabels(s string) map[string]string

func ParsePodAnnotations added in v0.11.0

func ParsePodAnnotations(s string) map[string]string

func ParsePodLabels added in v0.11.0

func ParsePodLabels(s string) map[string]string

Types

type Container added in v0.10.0

type Container struct {
	Id     string
	Name   string
	Labels map[string]string

	RootPid          int
	PidNamespace     int64
	MountNamespace   int64
	NetworkNamespace int64

	Image       string
	ImageDigest string
	// contains filtered or unexported fields
}

func (Container) EmptyNS added in v0.19.0

func (c Container) EmptyNS() bool

func (Container) FormatLabels added in v0.10.0

func (c Container) FormatLabels() string

func (*Container) IsNull added in v0.13.0

func (c *Container) IsNull() bool

func (Container) IsSandbox added in v0.18.0

func (c Container) IsSandbox() bool

func (*Container) Pod added in v0.15.0

func (c *Container) Pod() Pod

func (Container) TidyName added in v0.10.0

func (c Container) TidyName() string

type CountReport

type CountReport struct {
	Captured int
	Received int
	Dropped  int
}

type Device added in v0.25.0

type Device struct {
	Name    string
	Ifindex int
	NetNs   *NetNs
}

func (*Device) Key added in v0.25.0

func (d *Device) Key() string

func (*Device) String added in v0.25.0

func (d *Device) String() string

type Interfaces added in v0.25.0

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

func NewInterfaces added in v0.25.0

func NewInterfaces() *Interfaces

func (*Interfaces) Add added in v0.25.0

func (i *Interfaces) Add(dev Device)

func (*Interfaces) Devs added in v0.25.0

func (i *Interfaces) Devs() []Device

func (*Interfaces) GetByIfindex added in v0.25.0

func (i *Interfaces) GetByIfindex(index int) Device

func (*Interfaces) Merge added in v0.25.0

func (i *Interfaces) Merge(b *Interfaces)

type NetNs added in v0.25.0

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

func NewNetNs added in v0.25.0

func NewNetNs(netNsPath string) (*NetNs, error)

func NewNetNsWithInode added in v0.25.0

func NewNetNsWithInode(inode uint32) *NetNs

func (*NetNs) Do added in v0.25.0

func (n *NetNs) Do(f func()) (err error)

func (*NetNs) Inode added in v0.25.0

func (n *NetNs) Inode() uint32

func (*NetNs) Path added in v0.25.0

func (n *NetNs) Path() string

func (*NetNs) String added in v0.25.0

func (n *NetNs) String() string

type PacketContext added in v0.10.0

type PacketContext struct {
	Process
	Container
	Pod
}

func (*PacketContext) FromPacketComments added in v0.11.0

func (c *PacketContext) FromPacketComments(comments []string)

type Pod added in v0.11.0

type Pod struct {
	Name        string
	Namespace   string
	Uid         string
	Labels      map[string]string
	Annotations map[string]string
}

func (Pod) FormatAnnotations added in v0.11.0

func (p Pod) FormatAnnotations() string

func (Pod) FormatLabels added in v0.11.0

func (p Pod) FormatLabels() string

func (*Pod) LoadFromContainer added in v0.11.0

func (p *Pod) LoadFromContainer(c Container)

type Process added in v0.10.0

type Process struct {
	Parent ProcessBase

	ProcessBase
	ProcessNamespace
}

type ProcessBase added in v0.18.0

type ProcessBase struct {
	Pid          int
	Cmd          string
	CmdTruncated bool

	Args          []string
	ArgsTruncated bool
}

func (ProcessBase) Comm added in v0.18.0

func (p ProcessBase) Comm() string

func (ProcessBase) FormatArgs added in v0.18.0

func (p ProcessBase) FormatArgs() string

func (ProcessBase) MatchComm added in v0.18.0

func (p ProcessBase) MatchComm(name string) bool

type ProcessExec added in v0.25.0

type ProcessExec struct {
	PPid int
	Pid  int

	Filename          string
	FilenameTruncated bool

	Args          []string
	ArgsTruncated bool

	PidNs      int64
	MntNs      int64
	Netns      int64
	CgroupName string
}

func (ProcessExec) ArgsStr added in v0.25.0

func (p ProcessExec) ArgsStr() string

func (ProcessExec) FilenameStr added in v0.25.0

func (p ProcessExec) FilenameStr() string

func (ProcessExec) MatchComm added in v0.25.0

func (p ProcessExec) MatchComm(name string) bool

type ProcessNamespace added in v0.18.0

type ProcessNamespace struct {
	PidNamespaceId   int64
	MountNamespaceId int64
	NetNamespaceId   int64
}

Jump to

Keyboard shortcuts

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