runtime

package
v0.0.0-...-a134451 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFramework

func NewFramework(r Registry, profile *config.Profile, stopCh <-chan struct{}, opts ...Option) (framework.Framework, error)

NewFramework initializes plugins given the configuration and the registry.

func StagePriority

func StagePriority(stage *meta.Stage) int

Types

type CaptureProfile

type CaptureProfile func(config.Profile)

CaptureProfile is a callback to capture a finalized profile.

type Option

type Option func(*frameworkOptions)

Option for the frameworkImpl.

func WithClientSet

func WithClientSet(clientSet client.Interface) Option

WithClientSet sets clientSet for the scheduling frameworkImpl.

func WithEventRecorder

func WithEventRecorder(recorder events.EventRecorder) Option

WithEventRecorder sets clientSet for the scheduling frameworkImpl.

func WithExtenders

func WithExtenders(extenders []framework.Extender) Option

WithExtenders sets extenders for the scheduling frameworkImpl.

func WithStageNominator

func WithStageNominator(nominator framework.StageNominator) Option

WithStageNominator sets stageNominator for the scheduling frameworkImpl.

type PluginFactory

type PluginFactory = func(configuration runtime.Object, f framework.Handle) (framework.Plugin, error)

PluginFactory is a function that builds a plugin.

type Registry

type Registry map[string]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) error

Merge merges the provided registry to the current one.

func (Registry) Register

func (r Registry) Register(name string, factory PluginFactory) error

Register adds a new plugin to the registry. If a plugin with the same name exists, it returns an error.

func (Registry) Unregister

func (r Registry) Unregister(name string) error

Unregister removes an existing plugin from the registry. If no plugin with the provided name exists, it returns an error.

Jump to

Keyboard shortcuts

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