pluginregistry

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(
	name string,
	builderFunc PluginBuilder,
	pluginType interface{},
	exampleArg runtime.Object,
	pluginArgValidator PluginArgValidator,
	pluginArgDefaulter PluginArgDefaulter,
	registry Registry,
)

Types

type PluginArgDefaulter

type PluginArgDefaulter = func(args runtime.Object)

type PluginArgValidator

type PluginArgValidator = func(args runtime.Object) error

type PluginBuilder

type PluginBuilder = func(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)

type PluginUtilities

type PluginUtilities struct {
	PluginBuilder PluginBuilder

	PluginType interface{}
	// Just an example instance of this PluginArg so we can avoid having
	// to deal with reflect Types
	PluginArgInstance  runtime.Object
	PluginArgValidator PluginArgValidator
	PluginArgDefaulter PluginArgDefaulter
}

type Registry

type Registry map[string]PluginUtilities
var PluginRegistry Registry

func NewRegistry

func NewRegistry() Registry

Jump to

Keyboard shortcuts

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