pluginmanager

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Index

Constants

View Source
const (
	// Default external channel size for events
	// This is the default size of the channel that is used to send events from plugins to hubble
	DefaultExternalEventChannelSize = 10000
)
View Source
const (

	// In any run I haven't seen reconcile take longer than 5 seconds,
	// and 10 seconds seems like a reasonable SLA for reconciliation to be completed
	MAX_RECONCILE_TIME = 10 * time.Second
)
View Source
const (
	MAX_STARTUP_TIME = 10 * time.Second
)

Variables

View Source
var (
	ErrNilCfg       = errors.New("pluginmanager requires a non-nil config")
	ErrZeroInterval = errors.New("pluginmanager requires a positive MetricsInterval in its config")
)
View Source
var Cell = cell.Module(
	"pluginmanager",
	"Manages Retina eBPF plugins",
	cell.Provide(func() chan *v1.Event {
		return make(chan *v1.Event, DefaultExternalEventChannelSize)
	}),
	cell.Provide(newPluginManager),
)

Functions

This section is empty.

Types

type PluginManager

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

func NewPluginManager

func NewPluginManager(
	cfg *kcfg.Config,
	tel telemetry.Telemetry,
	pluginNames ...api.PluginName,
) (*PluginManager, error)

func (*PluginManager) Reconcile

func (p *PluginManager) Reconcile(ctx context.Context, plugin api.Plugin) error

Reconcile reconciles a particular plugin.

func (*PluginManager) SetPlugin

func (p *PluginManager) SetPlugin(name api.PluginName, plugin api.Plugin)

func (*PluginManager) SetupChannel

func (p *PluginManager) SetupChannel(c chan *v1.Event)

func (*PluginManager) Start

func (p *PluginManager) Start(ctx context.Context) error

Start plugin manager. Note: This will block as long as main thread is running.

func (*PluginManager) Stop

func (p *PluginManager) Stop()

Jump to

Keyboard shortcuts

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