agent

package
v1.15.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"monitor-agent",
	"Consumes the cilium events map and distributes those and other agent events",

	cell.Provide(newMonitorAgent),
	cell.Config(defaultConfig),
)

Cell provides the monitor agent, which monitors the cilium events perf event buffer and forwards events to consumers/listeners. It also handles multicasting of other agent events.

Functions

func ServeMonitorAPI

func ServeMonitorAPI(ctx context.Context, monitor Agent, queueSize int) error

ServeMonitorAPI serves the Cilium 1.2 monitor API on a unix domain socket. This method starts the server in the background. The server is stopped when ctx is cancelled. Each incoming connection registers a new listener on monitor.

Types

type Agent

type Agent interface {
	AttachToEventsMap(nPages int) error
	SendEvent(typ int, event interface{}) error
	RegisterNewListener(newListener listener.MonitorListener)
	RemoveListener(ml listener.MonitorListener)
	RegisterNewConsumer(newConsumer consumer.MonitorConsumer)
	RemoveConsumer(mc consumer.MonitorConsumer)
	State() *models.MonitorStatus
}

type AgentConfig

type AgentConfig struct {
	// EnableMonitor enables the monitor unix domain socket server
	EnableMonitor bool

	// MonitorQueueSize is the size of the monitor event queue
	MonitorQueueSize int
}

func (AgentConfig) Flags

func (def AgentConfig) Flags(flags *pflag.FlagSet)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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