runtime

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeInto added in v0.7.0

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 *deschedulerconfig.DeschedulerProfile, opts ...Option) (framework.Handle, error)

Types

type CaptureProfile

type CaptureProfile func(profile deschedulerconfig.DeschedulerProfile)

CaptureProfile is a callback to capture a finalized profile.

type Option

type Option func(*frameworkOptions)

Option for the frameworkImpl.

func WithCaptureProfile

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 Framework.

func WithEventRecorder

func WithEventRecorder(recorder events.EventRecorder) Option

WithEventRecorder sets clientSet for the scheduling frameworkImpl.

func WithGetPodsAssignedToNodeFunc

func WithGetPodsAssignedToNodeFunc(fn framework.GetPodsAssignedToNodeFunc) Option

func WithKubeConfig

func WithKubeConfig(kubeConfig *restclient.Config) Option

WithKubeConfig sets kubeConfig for the scheduling frameworkImpl.

func WithSharedInformerFactory

func WithSharedInformerFactory(sharedInformerFactory informers.SharedInformerFactory) Option

type PluginFactory

type PluginFactory func(args runtime.Object, handle framework.Handle) (framework.Plugin, error)

type Registry

type Registry map[string]PluginFactory

func (Registry) Merge

func (r Registry) Merge(in Registry) error

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