runtime

package
v1.10.0-preview4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFramework

func NewFramework(plugins []framework.Plugin) framework.Proxy

NewFramework create instance of framework.Proxy with determined order of Plugin.

Types

type PluginDependency

type PluginDependency struct {
	RestConfig *rest.Config
	RestMapper meta.RESTMapper

	KubeFactory    informers.SharedInformerFactory
	KarmadaFactory externalversions.SharedInformerFactory

	MinRequestTimeout time.Duration

	Store store.Store
}

PluginDependency holds dependency for plugins. It will be passed to PluginFactory when initializing Plugin.

type PluginFactory

type PluginFactory func(dep PluginDependency) (framework.Plugin, error)

PluginFactory is the function to create a plugin.

type Registry

type Registry []PluginFactory

Registry is a collection of all available plugins. The framework uses a registry to enable and initialize configured plugins. All plugins must be in the registry before initializing the framework.

func (*Registry) Merge

func (r *Registry) Merge(in Registry)

Merge merges the provided registry to the current one.

func (*Registry) Register

func (r *Registry) Register(factory PluginFactory)

Register adds a new plugin to the registry.

Jump to

Keyboard shortcuts

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