api

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package api provides the api for all Retina eBPF plugins.

Index

Constants

View Source
const (
	Meter       string = "retina-meter"
	ServiceName string = "retina"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	// Name returns the name of the plugin
	Name() string
	// Generate generates the plugin specific header files.
	// This maybe no-op for plugins that don't use eBPF.
	Generate(ctx context.Context) error
	// Compile compiles the eBPF code to generate bpf object.
	// This maybe no-op for plugins that don't use eBPF.
	Compile(ctx context.Context) error
	// Init initializes plugin specific objects. Depend on a given configuration, it may initialize eBPF maps, etc.
	Init() error
	// Start starts the plugin. The plugin should start its main loop and return.
	Start(ctx context.Context) error
	// Stop stops the plugin. The plugin should clean up all resources and exit.
	Stop() error
	// SetupChannel allows external components to setup a channel to the plugin to receive its events.
	// This can be useful for plugins that need to send data to other components for post-processing.
	SetupChannel(chan *v1.Event) error
}

Plugin provides the interface that all Retina eBPF plugins must implement.

type PluginName

type PluginName string

PluginName provides the type for the name of the plugin.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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