Documentation ¶
Index ¶
- Variables
- type IteratorFunc
- type Plugin
- type Registry
- func (r *Registry) Add(plg Plugin)
- func (r *Registry) Each(iterator IteratorFunc) error
- func (r *Registry) Get(name string) (Plugin, error)
- func (r *Registry) Load(ctx context.Context, path string) (Plugin, error)
- func (r *Registry) LoadAll(ctx context.Context, pattern string) ([]Plugin, error)
- func (r *Registry) Plugins() []Plugin
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidRegisterFunc is returned when the plugin package // could not find the expected RegisterPlugin func in the loaded // plugin. ErrInvalidRegisterFunc = errors.New("invalid register func") // ErrInvalidPlugin is returned when a loaded plugin does // not match the expected interface. ErrInvalidPlugin = errors.New("invalid plugin") // ErrPluginNotFound is returned when the given plugin could // not be found in the registry. ErrPluginNotFound = errors.New("plugin not found") )
Functions ¶
This section is empty.
Types ¶
type IteratorFunc ¶
Click to show internal directories.
Click to hide internal directories.