processtree

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetContainerSubtreeError added in v0.3.3

type GetContainerSubtreeError struct {
	Err error
}

func (*GetContainerSubtreeError) Error added in v0.3.3

func (e *GetContainerSubtreeError) Error() string

func (*GetContainerSubtreeError) Unwrap added in v0.3.3

func (e *GetContainerSubtreeError) Unwrap() error

type GetProcessNodeError added in v0.3.3

type GetProcessNodeError struct {
	Err error
}

func (*GetProcessNodeError) Error added in v0.3.3

func (e *GetProcessNodeError) Error() string

func (*GetProcessNodeError) Unwrap added in v0.3.3

func (e *GetProcessNodeError) Unwrap() error

type ProcessNotFoundError added in v0.3.3

type ProcessNotFoundError struct {
	Pid         uint32
	ContainerID string
}

func (*ProcessNotFoundError) Error added in v0.3.3

func (e *ProcessNotFoundError) Error() string

type ProcessTreeManager

type ProcessTreeManager interface {
	Start()
	Stop()
	GetContainerProcessTree(containerID string, pid uint32, useCache bool) (apitypes.Process, error)
	ReportEvent(eventType utils.EventType, event utils.K8sEvent) error
	GetPidList() []uint32
}

func NewProcessTreeManager

NewProcessTreeManager creates a new process tree manager

type ProcessTreeManagerImpl

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

ProcessTreeManagerImpl implements the ProcessTreeManager interface

func (*ProcessTreeManagerImpl) GetContainerProcessTree

func (ptm *ProcessTreeManagerImpl) GetContainerProcessTree(containerID string, pid uint32, useCache bool) (apitypes.Process, error)

func (*ProcessTreeManagerImpl) GetPidList added in v0.2.384

func (ptm *ProcessTreeManagerImpl) GetPidList() []uint32

func (*ProcessTreeManagerImpl) ReportEvent

func (ptm *ProcessTreeManagerImpl) ReportEvent(eventType utils.EventType, event utils.K8sEvent) error

func (*ProcessTreeManagerImpl) Start

func (ptm *ProcessTreeManagerImpl) Start()

Start initializes the process tree manager and starts background tasks

func (*ProcessTreeManagerImpl) Stop

func (ptm *ProcessTreeManagerImpl) Stop()

Stop shuts down the process tree manager and stops background tasks

type ProcessTreeManagerMock added in v0.2.384

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

ProcessTreeManagerMock implements the ProcessTreeManager interface for testing

func NewProcessTreeManagerMock added in v0.2.384

func NewProcessTreeManagerMock() *ProcessTreeManagerMock

NewProcessTreeManagerMock creates a new mock process tree manager

func (*ProcessTreeManagerMock) GetContainerProcessTree added in v0.2.384

func (m *ProcessTreeManagerMock) GetContainerProcessTree(containerID string, pid uint32, useCache bool) (apitypes.Process, error)

GetContainerProcessTree returns an empty process for testing

func (*ProcessTreeManagerMock) GetPidList added in v0.2.384

func (m *ProcessTreeManagerMock) GetPidList() []uint32

GetPidList returns the mock PID list

func (*ProcessTreeManagerMock) ReportEvent added in v0.2.384

func (m *ProcessTreeManagerMock) ReportEvent(eventType utils.EventType, event utils.K8sEvent) error

ReportEvent is a no-op for testing

func (*ProcessTreeManagerMock) SetPidList added in v0.2.384

func (m *ProcessTreeManagerMock) SetPidList(pids []uint32)

SetPidList sets the list of PIDs that the mock will return

func (*ProcessTreeManagerMock) Start added in v0.2.384

func (m *ProcessTreeManagerMock) Start()

Start is a no-op for testing

func (*ProcessTreeManagerMock) Stop added in v0.2.384

func (m *ProcessTreeManagerMock) Stop()

Stop is a no-op for testing

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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