runtime

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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