Documentation
¶
Index ¶
- Constants
- func NewFramework(r Registry, profile *schedulerapis.SchedulerProfile, opts ...Option) (framework.Framework, error)
- type Option
- func WithCache(cache cache.Cache) Option
- func WithClientSet(clientSet clusternet.Interface) Option
- func WithEventRecorder(recorder record.EventRecorder) Option
- func WithInformerFactory(informerFactory informers.SharedInformerFactory) Option
- func WithKubeConfig(kubeConfig *restclient.Config) Option
- func WithParallelism(parallelism int) Option
- func WithPercentageOfClustersToTolerate(percentageOfClustersToTolerate int32) Option
- func WithRunAllFilters(runAllFilters bool) Option
- type PluginFactory
- type Registry
Constants ¶
const (
// Filter is the name of the filter extension point.
Filter = "Filter"
)
Variables ¶
This section is empty.
Functions ¶
func NewFramework ¶
func NewFramework(r Registry, profile *schedulerapis.SchedulerProfile, opts ...Option) (framework.Framework, error)
NewFramework initializes plugins given the configuration and the registry.
Types ¶
type Option ¶
type Option func(*frameworkOptions)
Option for the frameworkImpl.
func WithClientSet ¶
func WithClientSet(clientSet clusternet.Interface) Option
WithClientSet sets clientSet for the scheduling frameworkImpl.
func WithEventRecorder ¶
func WithEventRecorder(recorder record.EventRecorder) Option
WithEventRecorder sets clientSet for the scheduling frameworkImpl.
func WithInformerFactory ¶
func WithInformerFactory(informerFactory informers.SharedInformerFactory) Option
WithInformerFactory sets informer factory for the scheduling frameworkImpl.
func WithKubeConfig ¶
func WithKubeConfig(kubeConfig *restclient.Config) Option
WithKubeConfig sets kubeConfig for the scheduling frameworkImpl.
func WithParallelism ¶
WithParallelism sets parallelism for the scheduling frameworkImpl.
func WithPercentageOfClustersToTolerate ¶ added in v0.16.0
WithPercentageOfClustersToTolerate sets percentage of clusters to be tolerated for predicting failures.
func WithRunAllFilters ¶
WithRunAllFilters sets the runAllFilters flag, which means RunFilterPlugins accumulates all failure Statuses.
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) 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 ¶
Unregister removes an existing plugin from the registry. If no plugin with the provided name exists, it returns an error.