runtime

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 17 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 EvictionLimiter added in v1.2.0

type EvictionLimiter interface {
	AllowEvict(pod *corev1.Pod) bool
	Done(pod *corev1.Pod)
	Reset()
	NodeLimitExceeded(node *corev1.Node) bool
	TotalEvicted() uint
}

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 WithDryRun added in v1.2.0

func WithDryRun(dryRun bool) Option

func WithEventRecorder

func WithEventRecorder(recorder events.EventRecorder) Option

WithEventRecorder sets clientSet for the scheduling frameworkImpl.

func WithEvictionLimiter added in v1.2.0

func WithEvictionLimiter(limiter EvictionLimiter) Option

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