pluginmanager

package
v0.0.1-pre Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

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

Index

Constants

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")
)

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