apis

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	// Name defines the name of plugin
	Name string
	// Weight defines the weight of plugin, only used for Score plugins.
	Weight int32
}

Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.

type PluginSet

type PluginSet struct {
	// Enabled specifies plugins that should be enabled in addition to default plugins.
	// These are called after default plugins and in the same order specified here.
	Enabled []Plugin
	// Disabled specifies default plugins that should be disabled.
	// When all default plugins need to be disabled, an array containing only one "*" should be provided.
	Disabled []Plugin
}

PluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.

type Plugins

type Plugins struct {
	// PreFilter is a list of plugins that should be invoked at "PreFilter" extension point of the predictor framework.
	PreFilter PluginSet

	// Filter is a list of plugins that should be invoked when filtering out clusters that cannot run the requirements.
	Filter PluginSet

	// PostFilter is a list of plugins that are invoked after filtering phase, no matter whether filtering succeeds or not.
	PostFilter PluginSet

	// PreCompute is a list of plugins that are invoked before Computing.
	PreCompute PluginSet

	// Compute is a list of plugins that should be invoked when compute max available replicas for nodes that have passed the filtering phase.
	Compute PluginSet

	// PreScore is a list of plugins that are invoked before scoring.
	PreScore PluginSet

	// Score is a list of plugins that should be invoked when ranking clusters that have passed the filtering phase.
	Score PluginSet

	// PreAggregate is a list of plugins that are invoked before aggregating.
	PreAggregate PluginSet

	// Assign is a list of plugins that should be invoked when aggregating replicas.
	Aggregate PluginSet
}

Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.

func (*Plugins) Names

func (p *Plugins) Names() []string

Names returns the list of enabled plugin names.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL