registry

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func Add added in v0.0.21

func Add(name string, f PluginFunc)

Types

type Plugin added in v0.0.21

type Plugin interface {
	// Name returns the name of the plugin.
	Name() string
	// Generate generates the plugin specific header files.
	// This may be no-op for plugins that don't use eBPF.
	Generate(ctx context.Context) error
	// Compile compiles the eBPF code to generate bpf object.
	// This may be 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 plugins must implement.

type PluginFunc added in v0.0.21

type PluginFunc func(*kcfg.Config) Plugin

PluginFunc is the Constructor func that all PLugins must provide to Register.

func Get added in v0.0.21

func Get(name string) (PluginFunc, bool)

Jump to

Keyboard shortcuts

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