engine

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePrometheusMetric

func CreatePrometheusMetric() *prometheusMetric

func GetRequiredEventsFromRules

func GetRequiredEventsFromRules(rules []rule.Rule) []tracing.EventType

Types

type ClientSetInterface

type ClientSetInterface interface {
	CoreV1() corev1.CoreV1Interface
	Discovery() discovery.DiscoveryInterface
	AppsV1() appsv1.AppsV1Interface
	BatchV1() batchv1.BatchV1Interface
}

type Engine

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

func NewEngine

func NewEngine(k8sClientset ClientSetInterface, appProfileCache approfilecache.ApplicationProfileCache, tracer *tracing.Tracer, workerPoolWidth int, nodeName string) *Engine

func (*Engine) Delete

func (e *Engine) Delete()

func (*Engine) GetApiServerIpAddress added in v0.0.5

func (engine *Engine) GetApiServerIpAddress() (string, error)

func (*Engine) GetPodSpec added in v0.0.3

func (engine *Engine) GetPodSpec(podName, namespace, containerID string) (*corev1.PodSpec, error)

func (*Engine) GetRulesForEvent

func (engine *Engine) GetRulesForEvent(event *tracing.GeneralEvent) []rule.Rule

func (*Engine) GetWorkloadOwnerKindAndName

func (engine *Engine) GetWorkloadOwnerKindAndName(event *tracing.GeneralEvent) (string, string, error)

func (*Engine) IsContainerIDInCache

func (engine *Engine) IsContainerIDInCache(containerID string) bool

func (*Engine) OnContainerActivityEvent

func (engine *Engine) OnContainerActivityEvent(event *tracing.ContainerActivityEvent)

func (*Engine) OnRuleBindingChanged

func (engine *Engine) OnRuleBindingChanged(ruleBinding rulebindingstore.RuntimeAlertRuleBinding)

func (*Engine) Poll

func (engine *Engine) Poll()

Function main poll loop

func (*Engine) ProcessEvent

func (engine *Engine) ProcessEvent(eventType tracing.EventType, event interface{}, appProfile approfilecache.SingleApplicationProfileAccess, boundRules []rule.Rule)

func (*Engine) SendCapabilitiesEvent

func (engine *Engine) SendCapabilitiesEvent(event *tracing.CapabilitiesEvent)

func (*Engine) SendDnsEvent

func (engine *Engine) SendDnsEvent(event *tracing.DnsEvent)

func (*Engine) SendExecveEvent

func (engine *Engine) SendExecveEvent(event *tracing.ExecveEvent)

func (*Engine) SendNetworkEvent

func (engine *Engine) SendNetworkEvent(event *tracing.NetworkEvent)

func (*Engine) SendOpenEvent

func (engine *Engine) SendOpenEvent(event *tracing.OpenEvent)

func (*Engine) SetGetRulesForPodFunc

func (e *Engine) SetGetRulesForPodFunc(getRulesForPodFunc func(podName, namespace string) ([]rulebindingstore.RuntimeAlertRuleBindingRule, error))

func (*Engine) StartPullComponent

func (engine *Engine) StartPullComponent()

Function to start pull componet from tracer

func (*Engine) StopPullComponent

func (engine *Engine) StopPullComponent()

Function to stop pull componet from tracer

type EngineStatePrinter

type EngineStatePrinter interface {
	Print(v ...any)
}

type EngineStats

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

func CreateStatComponent

func CreateStatComponent(printer EngineStatePrinter, collectionInterval time.Duration) *EngineStats

func (*EngineStats) DestroyStatComponent

func (e *EngineStats) DestroyStatComponent()

func (*EngineStats) ReportEbpfEvent

func (e *EngineStats) ReportEbpfEvent(eventType tracing.EventType)

func (*EngineStats) ReportRuleAlereted

func (e *EngineStats) ReportRuleAlereted(ruleID string)

func (*EngineStats) ReportRuleProcessed

func (e *EngineStats) ReportRuleProcessed(ruleID string)

func (*EngineStats) StatProcessing

func (e *EngineStats) StatProcessing()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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