Help us shape the future of Go! Take the 2026 Go Developer Survey

agent

package
v1.18.16 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 27 Imported by: 9

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, logger *slog.Logger, 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 any) 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