sender

package
v0.0.0-...-fc6ac2f Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Overview

Package sender handles sending CNM data to the backend

Package sender handles sending CNM data to the backend

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirectSenderConsumer

func NewDirectSenderConsumer(em EventConsumerRegistry, log log.Component, sysprobeconfig sysprobeconfig.Component) (eventmonitor.EventConsumer, error)

NewDirectSenderConsumer creates the direct sender consumer and returns it for event monitor registration

Types

type ConnectionsSource

type ConnectionsSource interface {
	RegisterClient(clientID string) error
	GetActiveConnections(clientID string) (*network.Connections, func(), error)
}

ConnectionsSource is an interface for an object that can provide network connections data

type Dependencies

type Dependencies struct {
	Config         config.Component
	Logger         log.Component
	Sysprobeconfig sysprobeconfig.Component
	Tagger         tagger.Component
	Wmeta          workloadmeta.Component
	Hostname       hostname.Component
	Forwarder      connectionsforwarder.Component
	NPCollector    npcollector.Component
}

Dependencies are all the component dependencies of the direct sender

type EventConsumerRegistry

type EventConsumerRegistry interface {
	AddEventConsumerHandler(consumer eventmonitor.EventConsumerHandler) error
}

EventConsumerRegistry is the interface for an eventmonitor which allows adding handlers

type Sender

type Sender interface {
	Stop()
}

Sender sends data directly to the backend for CNM/USM data

func New

func New(
	ctx context.Context,
	tr ConnectionsSource,
	deps Dependencies,
) (Sender, error)

New creates a direct sender

Jump to

Keyboard shortcuts

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