plugins

package
v2.2.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PLUGIN_LOADING = iota
	PLUGIN_LOADED  = iota
	PLUGIN_FAILED  = iota
)

Variables

This section is empty.

Functions

func GetOrLoadMaestroPlugin

func GetOrLoadMaestroPlugin(opts *maestroSpecs.PluginOpts, logger maestroSpecs.Logger, path string, callback PeriodicCallback) (plugin *plugin.Plugin, err error)

GetOrLoadMaestroPlugin loads a plugin. It may block while loading the plugin and while waiting for another caller to load the plugin (in which case it will unblock for the other caller and this caller). If the plugin is already loaded it will return the plugin without blocking.

func InspectPlugin

func InspectPlugin(p *plugin.Plugin)

func NewPluginLogger

func NewPluginLogger(pluginName string) (logger *log.PrefixedLogger)

NewPluginLogger returns a new logger object handed to a plugin

func StopPeriodicOfPlugin

func StopPeriodicOfPlugin(path string, routineName string) (err error)

StopPeriodicOfPlugin - stops periodically calling the periodic function of routineName in the plugin already loaded with path

Types

type PeriodicCallback

type PeriodicCallback func(param interface{})

PeriodicCallback is a function spec which is used for an optionalk user supplied callback which is called ever time a plugin's periodic functions are called

type Plug

type Plug struct {
	Path string

	Symbols map[string]interface{}
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL