Documentation ¶ Overview ¶ Package plugin provides the ability to load plugins Index ¶ func Build(path string, p *Plugin) error func Commands() []cli.Command func Generate(path string, p *Plugin) error func Init(p *Plugin) error func NewPlugin() plugin.Plugin type Plugin func Load(path string) (*Plugin, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Build ¶ func Build(path string, p *Plugin) error Build generates a dso plugin using the go command `go build -buildmode=plugin` func Commands ¶ func Commands() []cli.Command Commands returns license commands func Generate ¶ func Generate(path string, p *Plugin) error Generate creates a go file at the specified path. You must use `go build -buildmode=plugin`to build it. func Init ¶ func Init(p *Plugin) error Init sets up the plugin func NewPlugin ¶ func NewPlugin() plugin.Plugin returns a micro plugin which loads plugins Types ¶ type Plugin ¶ type Plugin struct { // Name of the plugin e.g rabbitmq Name string // Type of the plugin e.g broker Type string // Path specifies the import path Path string // NewFunc creates an instance of the plugin NewFunc interface{} } Plugin is a plugin loaded from a file func Load ¶ func Load(path string) (*Plugin, error) Load loads a plugin created with `go build -buildmode=plugin` Source Files ¶ View all Source files commands.go loader.go plugin.go template.go Click to show internal directories. Click to hide internal directories.