controller

package
v0.0.0-...-dbcdc5d Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 1TB of executable address space
	MaxArgMapScaleFactor = 8
)
View Source
const MiB = 1 << 20

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BpfVerifierLogLevel    uint
	CollAgentAddr          string
	Copyright              bool
	DisableTLS             bool
	MapScaleFactor         uint
	MonitorInterval        time.Duration
	ClockSyncInterval      time.Duration
	NoKernelVersionCheck   bool
	PprofAddr              string
	ProbabilisticInterval  time.Duration
	ProbabilisticThreshold uint
	ReporterInterval       time.Duration
	SamplesPerSecond       int
	SendErrorFrames        bool
	Tracers                string
	VerboseMode            bool
	Version                bool
	// HostName is the name of the host.
	HostName string
	// IPAddress is the IP address of the host that sends data to CollAgentAddr.
	IPAddress string

	Reporter reporter.Reporter

	Fs *flag.FlagSet
}

func (*Config) Dump

func (cfg *Config) Dump()

Dump visits all flag sets, and dumps them all to debug Used for verbose mode logging.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate runs validations on the provided configuration, and returns errors if invalid values were provided.

type Controller

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

Controller is an instance that runs, manages and stops the agent.

func New

func New(cfg *Config) *Controller

New creates a new controller The controller can set global configurations (such as the eBPF syscalls) on setup. So there should only ever be one running.

func (*Controller) Shutdown

func (c *Controller) Shutdown()

Shutdown stops the controller

func (*Controller) Start

func (c *Controller) Start(ctx context.Context) error

Start starts the controller The controller should only be started once.

Jump to

Keyboard shortcuts

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