Documentation
¶
Index ¶
- Constants
- func Backend(key string, backend interface{}) error
- func Loaded() map[string]Plugin
- func ParseKey(key string) (newKey, alias string)
- func Register(key string, pi Plugin) error
- type BasePlugin
- type Plugin
- type Plugins
- func (p *Plugins) Backend(key string, backend interface{}) (err error)
- func (p *Plugins) Close() (err error)
- func (p *Plugins) Get(key string) (pi Plugin, err error)
- func (p *Plugins) Loaded() (pm map[string]Plugin)
- func (p *Plugins) Register(key string, pi Plugin) (err error)
- func (p *Plugins) Test() (err error)
- func (p *Plugins) TestAsync(q *queue.Queue) (err error)
Constants ¶
View Source
const ( // ErrExpectedEndParen is returned when an ending parenthesis is missing ErrExpectedEndParen = errors.Error("expected ending parenthesis") // ErrInvalidDir is returned when a directory is empty ErrInvalidDir = errors.Error("invalid directory, cannot be empty") // ErrPluginKeyExists is returned when a plugin cannot be added because it already exists ErrPluginKeyExists = errors.Error("plugin cannot be added, key already exists") // ErrPluginNotLoaded is returned when a plugin namespace is provided that has not been loaded ErrPluginNotLoaded = errors.Error("plugin with that key has not been loaded") // ErrNotAddressable is returned when a non-addressable value is provided ErrNotAddressable = errors.Error("provided backend must be addressable") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasePlugin ¶ added in v0.5.0
type BasePlugin struct{}
func (*BasePlugin) Backend ¶ added in v0.5.0
func (b *BasePlugin) Backend() interface{}
func (*BasePlugin) Close ¶ added in v0.5.0
func (b *BasePlugin) Close() error
func (*BasePlugin) Load ¶ added in v0.5.0
func (b *BasePlugin) Load() error
type Plugin ¶
type Plugins ¶
type Plugins struct {
// contains filtered or unexported fields
}
Plugins manages loaded plugins
Click to show internal directories.
Click to hide internal directories.