runtime

package
v1.10.0-preview3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFramework

func NewFramework(r Registry, opts ...Option) (framework.Framework, error)

NewFramework creates a scheduling framework by registry.

Types

type Option added in v1.4.0

type Option func(*frameworkOptions)

Option for the frameworkImpl.

type PluginFactory added in v1.2.0

type PluginFactory = func() (framework.Plugin, error)

PluginFactory is a function that builds a plugin.

type Registry added in v1.2.0

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) FactoryNames added in v1.3.0

func (r Registry) FactoryNames() []string

FactoryNames returns all known plugin names

func (Registry) Filter added in v1.3.0

func (r Registry) Filter(names []string) Registry

Filter out the disabled plugin

func (Registry) Merge added in v1.2.0

func (r Registry) Merge(in Registry) error

Merge merges the provided registry to the current one.

func (Registry) Register added in v1.2.0

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

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