eventmonitor

package
v0.0.0-...-3d9a706 Latest Latest
Warning

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

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

Documentation

Overview

Package eventmonitor holds eventmonitor related files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventConsumer

type EventConsumer interface {
	// ID returns the ID of the event consumer
	ID() string
	// Start starts the event consumer
	Start() error
	// Stop stops the event consumer
	Stop()
}

EventConsumer defines an event consumer

type EventConsumerPostProbeStartHandler

type EventConsumerPostProbeStartHandler interface {
	// PostProbeStart is called after the event stream (the probe) is started
	PostProbeStart() error
}

EventConsumerPostProbeStartHandler defines an event consumer that can respond to PostProbeStart events

type EventMonitor

type EventMonitor struct {
	sync.RWMutex
	Probe *probe.Probe

	Config       *config.Config
	StatsdClient statsd.ClientInterface
	GRPCServer   *grpc.Server
	// contains filtered or unexported fields
}

EventMonitor represents the system-probe module for kernel event monitoring

func NewEventMonitor

func NewEventMonitor(config *config.Config, secconfig *secconfig.Config, opts Opts, wmeta optional.Option[workloadmeta.Component]) (*EventMonitor, error)

NewEventMonitor instantiates an event monitoring system-probe module

func (*EventMonitor) AddEventTypeHandler

func (m *EventMonitor) AddEventTypeHandler(eventType model.EventType, handler EventTypeHandler) error

AddEventTypeHandler registers an event handler

func (*EventMonitor) Close

func (m *EventMonitor) Close()

Close the module

func (*EventMonitor) GetStats

func (m *EventMonitor) GetStats() map[string]interface{}

GetStats returns statistics about the module

func (*EventMonitor) Init

func (m *EventMonitor) Init() error

Init initializes the module

func (*EventMonitor) Register

func (m *EventMonitor) Register(_ *module.Router) error

Register the event monitoring module

func (*EventMonitor) RegisterEventConsumer

func (m *EventMonitor) RegisterEventConsumer(consumer EventConsumer)

RegisterEventConsumer registers an event consumer

func (*EventMonitor) SendStats

func (m *EventMonitor) SendStats()

SendStats send stats

func (*EventMonitor) Start

func (m *EventMonitor) Start() error

Start the module

type EventTypeHandler

type EventTypeHandler interface {
	probe.EventHandler
}

EventTypeHandler event type based handler

type Opts

type Opts struct {
	ProbeOpts    probe.Opts
	StatsdClient statsd.ClientInterface
}

Opts defines options that can be used for the eventmonitor

Directories

Path Synopsis
Package config holds config related files
Package config holds config related files
proto
api

Jump to

Keyboard shortcuts

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