containerwatcher

package
v0.2.103 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSniffingTimeLabel = "kubescape.io/max-sniffing-time"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IGContainerWatcher

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

func CreateIGContainerWatcher

func CreateIGContainerWatcher(cfg config.Config, applicationProfileManager applicationprofilemanager.ApplicationProfileManagerClient, k8sClient *k8sinterface.KubernetesApi, relevancyManager relevancymanager.RelevancyManagerClient, networkManagerv1Client networkmanagerv1.NetworkManagerClient, networkManagerClient networkmanager.NetworkManagerClient, dnsManagerClient dnsmanager.DNSManagerClient, metrics metricsmanager.MetricsManager, ruleManager rulemanager.RuleManagerClient, malwareManager malwaremanager.MalwareManagerClient, preRunningContainers mapset.Set[string], ruleBindingPodNotify *chan rulebinding.RuleBindingNotify) (*IGContainerWatcher, error)

func (*IGContainerWatcher) Ready

func (ch *IGContainerWatcher) Ready() bool

func (*IGContainerWatcher) Start

func (ch *IGContainerWatcher) Start(ctx context.Context) error

func (*IGContainerWatcher) Stop

func (ch *IGContainerWatcher) Stop()

type IGK8sClient

type IGK8sClient interface {
	GetNonRunningContainers(pod *corev1.Pod) []string
	GetRunningContainers(pod *corev1.Pod) []containercollection.Container
	ListContainers() (arr []containercollection.Container, err error)
}

type IGK8sClientMock

type IGK8sClientMock struct {
}

func NewIGK8sClientMock

func NewIGK8sClientMock() *IGK8sClientMock

func (*IGK8sClientMock) GetNonRunningContainers

func (k *IGK8sClientMock) GetNonRunningContainers(pod *corev1.Pod) []string

GetNonRunningContainers returns the list of containers IDs that are not running.

func (*IGK8sClientMock) GetRunningContainers

func (k *IGK8sClientMock) GetRunningContainers(pod *corev1.Pod) []containercollection.Container

GetRunningContainers returns a list of the containers of a given Pod that are running.

func (*IGK8sClientMock) ListContainers

func (k *IGK8sClientMock) ListContainers() (arr []containercollection.Container, err error)

ListContainers return a list of the current containers that are running in the node.

Jump to

Keyboard shortcuts

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