enrichment

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCannotGetInode         = errors.New("cannot get inode for path")
	ErrProcFolderDoesNotExist = errors.New("/proc/<pid> folder does not exist")
	ErrFileDoesNotExist       = errors.New("wanted file does not exist")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	WorkerCount    int
	EventEnrichers []EventEnricher
}

type ContainerForCgroupGetter

type ContainerForCgroupGetter func(cgroup uint64) (*containers.Container, bool, error)

type EnrichRequest

type EnrichRequest struct {
	Event        *castpb.Event
	EventContext *types.EventContext
	Args         types.Args
	Container    *containers.Container
}

type EventEnricher

type EventEnricher interface {
	// Enrich will add additional data to the provided Event.
	Enrich(context.Context, *EnrichRequest)

	// EventsTypes returns a slice of event types, this enricher reacts to.
	EventTypes() []castpb.EventType
}

func EnrichWithFileHash

func EnrichWithFileHash(log *logging.Logger, mountNamespacePIDStore *types.PIDsPerNamespace, procFS proc.ProcFS) EventEnricher

type PIDsInNamespaceGetter

type PIDsInNamespaceGetter func(ns uint32) []uint32

type Service

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

func NewService

func NewService(log *logging.Logger, cfg Config) *Service

func (*Service) Enqueue

func (s *Service) Enqueue(e *EnrichRequest) bool

func (*Service) Events

func (s *Service) Events() chan *castpb.Event

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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