registry

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry manages plugin instances

func NewRegistry

func NewRegistry(pluginConfig map[string]plugin.PluginConfig) (*Registry, error)

NewRegistry creates a new plugin registry

func (*Registry) Close

func (r *Registry) Close(ctx context.Context) error

Close closes all plugins

func (*Registry) GetPlugin

func (r *Registry) GetPlugin(name string) (plugininterface.Plugin, error)

GetPlugin returns a plugin by name

func (*Registry) GetPlugins

func (r *Registry) GetPlugins() map[string]plugininterface.Plugin

GetPlugins returns all loaded plugins as a map of name to plugin

func (*Registry) LoadPlugin

func (r *Registry) LoadPlugin(name string, cfg plugin.PluginConfig) error

LoadPlugin loads a plugin from the given path with the provided configuration

Jump to

Keyboard shortcuts

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