runtime

package
v1.22.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 25 Imported by: 76

Documentation

Index

Constants

View Source
const (
	// Filter is the name of the filter extension point.
	Filter = "Filter"
)

Variables

This section is empty.

Functions

func DecodeInto

func DecodeInto(obj runtime.Object, into interface{}) error

DecodeInto decodes configuration whose type is *runtime.Unknown to the interface into.

func NewFramework

func NewFramework(r Registry, profile *config.KubeSchedulerProfile, opts ...Option) (framework.Framework, error)

NewFramework initializes plugins given the configuration and the registry.

Types

type CaptureProfile added in v1.20.0

type CaptureProfile func(config.KubeSchedulerProfile)

CaptureProfile is a callback to capture a finalized profile.

type Option

type Option func(*frameworkOptions)

Option for the frameworkImpl.

func WithCaptureProfile added in v1.20.0

func WithCaptureProfile(c CaptureProfile) Option

WithCaptureProfile sets a callback to capture the finalized profile.

func WithClientSet

func WithClientSet(clientSet clientset.Interface) Option

WithClientSet sets clientSet for the scheduling frameworkImpl.

func WithClusterEventMap added in v1.21.0

func WithClusterEventMap(m map[framework.ClusterEvent]sets.String) Option

WithClusterEventMap sets clusterEventMap 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 WithInformerFactory

func WithInformerFactory(informerFactory informers.SharedInformerFactory) Option

WithInformerFactory sets informer factory for the scheduling frameworkImpl.

func WithKubeConfig added in v1.22.0

func WithKubeConfig(kubeConfig *restclient.Config) Option

WithKubeConfig sets kubeConfig for the scheduling frameworkImpl.

func WithParallelism added in v1.21.0

func WithParallelism(parallelism int) Option

WithParallelism sets parallelism for the scheduling frameworkImpl.

func WithPodNominator

func WithPodNominator(nominator framework.PodNominator) Option

WithPodNominator sets podNominator for the scheduling frameworkImpl.

func WithRunAllFilters

func WithRunAllFilters(runAllFilters bool) Option

WithRunAllFilters sets the runAllFilters flag, which means RunFilterPlugins accumulates all failure Statuses.

func WithSnapshotSharedLister

func WithSnapshotSharedLister(snapshotSharedLister framework.SharedLister) Option

WithSnapshotSharedLister sets the SharedLister of the snapshot.

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