Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginInstance ¶
type PluginInstance interface { // Kill kills the plugin if it is external. It is safe to call on internal // plugins. Kill() // Plugin returns the wrapped plugin instance. Plugin() interface{} }
PluginInstance is a wrapper of a plugin and provides a common interface whether the plugin is internal or running externally via a binary.
type PluginManager ¶
type PluginManager struct {
// contains filtered or unexported fields
}
PluginManager is the brains of the plugin operation and should be used to manage plugin lifecycle as well as provide access to the underlying plugin interfaces.
func NewPluginManager ¶
func NewPluginManager(log hclog.Logger, dir string, cfg map[string][]*config.Plugin) *PluginManager
NewPluginManager sets up a new PluginManager for use.
func (*PluginManager) Dispense ¶
func (pm *PluginManager) Dispense(name, pluginType string) (PluginInstance, error)
Dispense returns a PluginInstance for use by safely obtaining the PluginInstance from storage if we have it.
func (*PluginManager) KillPlugins ¶
func (pm *PluginManager) KillPlugins()
KillPlugins calls Kill on all plugins currently dispensed.
func (*PluginManager) Load ¶
func (pm *PluginManager) Load() error
Load is responsible for registering and executing the plugins configured for use by the Autoscaler agent.