Documentation
¶
Overview ¶
package registry provides a registry of plugins. This is used to register plugins that will be used by a workstream plan.
Usage:
package main
import (
"github.com/element-of-surprise/plugins/github" // Doesn't really exist, example name
"github.com/element-of-surprise/coercion/registry"
)
func main() {
reg := registry.New()
if err := reg.Register(github.New()); err != nil {
// handle error
}
...
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Register ¶
type Register struct {
// contains filtered or unexported fields
}
Register provides a Register for plugins. This should not be used directly by the user, but instead via the Registry variable. Use of this type directly is not supported.
func (*Register) MustRegister ¶
MustRegister registers a plugin by name. It panics if their is an error registering the plugin.
func (*Register) Plugin ¶
Plugin returns a plugin by name. It returns nil if the plugin is not found.
Click to show internal directories.
Click to hide internal directories.