Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotCompliant = errors.New("plugin not compliant")
ErrNotCompliant is returned by Manager.Run when the plugin is found but not compliant.
View Source
var ErrNotFound = errors.New("plugin not found")
ErrNotFound is returned by Manager.Get and Manager.Run when the plugin is not found.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages plugins installed on the system.
func New ¶
New returns a new manager rooted at root.
roots is the path of the directories where plugins are stored following the {root}/{plugin-name}/notation-{plugin-name}[.exe] pattern.
if roots is not set, it uses the build in directory structure.
func (*Manager) Get ¶
Get returns a plugin on the system by its name.
If the plugin is not found, the error is of type ErrNotFound. The plugin might be incomplete if p.Err is not nil.
Click to show internal directories.
Click to hide internal directories.