catalog

package
v0.11.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package catalog is used to register internal plugins such that they can be loaded.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Catalog

func Catalog() map[loader.PluginID]*Registration

Catalog returns the catalog of internal plugins

func Register

func Register(id loader.PluginID, config *loader.InternalPluginConfig)

Register is used to register an internal plugin.

func RegisterDeferredConfig

func RegisterDeferredConfig(id loader.PluginID, config *loader.InternalPluginConfig, configLoader ConfigFromOptions)

RegisterDeferredConfig is used to register an internal plugin that sets its config using the client's option map.

func TestPluginLoader

func TestPluginLoader(t testing.T) loader.PluginCatalog

TestPluginLoader returns a plugin loader populated only with internal plugins

func TestPluginLoaderWithOptions

func TestPluginLoaderWithOptions(t testing.T,
	pluginDir string,
	options map[string]string,
	configs []*config.PluginConfig) loader.PluginCatalog

TestPluginLoaderWithOptions allows configuring the plugin loader fully.

Types

type ConfigFromOptions

type ConfigFromOptions func(options map[string]string) (config map[string]interface{}, err error)

ConfigFromOptions is used to retrieve a plugin config when passed a node's option map. This allows upgrade pathing from the old configuration format to the new config format.

type Registration

type Registration struct {
	Config       *loader.InternalPluginConfig
	ConfigLoader ConfigFromOptions
}

Registration is the registration of an internal plugin

Jump to

Keyboard shortcuts

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