Documentation
¶
Index ¶
- Constants
- func ParseKey(key string) (newKey, alias string)
- type Plugin
- type Plugins
- func (p *Plugins) Backend(key string, backend interface{}) (err error)
- func (p *Plugins) Build() (err error)
- func (p *Plugins) BuildAsync(q *queue.Queue) (err error)
- func (p *Plugins) Close() (err error)
- func (p *Plugins) Get(key string) (plugin *plugin.Plugin, err error)
- func (p *Plugins) Initialize() (err error)
- func (p *Plugins) New(pluginKey string, update bool) (key string, err error)
- func (p *Plugins) Retrieve() (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 Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin represents a plugin entry
type Plugins ¶
type Plugins struct {
// Override config if set
Branch string
// contains filtered or unexported fields
}
Plugins manages loaded plugins
func (*Plugins) BuildAsync ¶
BuildAsync will build all of the plugins asynchronously
func (*Plugins) Initialize ¶
Initialize will initialize all loaded plugins
func (*Plugins) New ¶
New will load a new plugin by plugin key The following formats are accepted as keys:
- path/to/file/plugin.so
- github.com/username/repository/pluginDir
Click to show internal directories.
Click to hide internal directories.