agent

package
v1.9.0-crc0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPsFromInterface added in v0.3.3

func IPsFromInterface(ifaceName string) ([]netip.Addr, error)

Default function for getting the list of IPs configured for a specific network interface

Types

type Flows

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

Flows reporting agent

func FlowsAgent

func FlowsAgent(cfg *config.Agent) (*Flows, error)

FlowsAgent instantiates a new agent, given a configuration.

func (*Flows) Run

func (f *Flows) Run(ctx context.Context) error

Run a Flows agent. The function will keep running in the same thread until the passed context is canceled

func (*Flows) Status added in v0.2.2

func (f *Flows) Status() Status

type InterfaceFilter added in v0.3.3

type InterfaceFilter interface {
	Allowed(iface string) (bool, error)
}

type Packets added in v0.3.3

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

Packets reporting agent

func PacketsAgent added in v0.3.3

func PacketsAgent(cfg *config.Agent) (*Packets, error)

PacketsAgent instantiates a new agent, given a configuration.

func (*Packets) Run added in v0.3.3

func (p *Packets) Run(ctx context.Context) error

Run a Packets agent. The function will keep running in the same thread until the passed context is canceled

func (*Packets) Status added in v0.3.3

func (p *Packets) Status() Status

type Status added in v0.2.2

type Status int

Status of the agent service. Helps on the health report as well as making some asynchronous tests waiting for the agent to accept flows.

const (
	StatusNotStarted Status = iota
	StatusStarting
	StatusStarted
	StatusStopping
	StatusStopped
)

func (Status) String added in v0.2.2

func (s Status) String() string

Jump to

Keyboard shortcuts

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