plugins

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	// Name is the name of plugin, must be unique.
	Name() string
	// Start is called to run this plugin.
	Start() error
	// Stop is called to stop this plugin.
	Stop() error
	// Feature returns feature name of this plugin.
	Feature() featuregate.Feature
}

Plugin interface contains methods which must be implemented by all plugins.

type PluginContext

type PluginContext struct {
	K8sClient      k8s.K8sClient
	StatesInformer statesinformer.StatesInformer
	MetricCache    metriccache.MetricCache
	MetricsQuery   metricsquery.MetricsQuery
	// Extra custom configuration for plugin.
	ExtraConfig *string
}

type PluginFactoryFn

type PluginFactoryFn func(ctx *PluginContext) Plugin

Jump to

Keyboard shortcuts

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