Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LoadedEvent event name // Triggered after loading a plugin or set of plugins LoadedEvent string = "loaded_event" // PluginRegisteredEvent event name // Triggered after registering a plugin PluginRegisteredEvent string = "plugin_registered_event" // ServiceStartedEvent event name // Triggered after starting a service ServiceStartedEvent string = "service_started_event" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { LoadPluginsDir(directory string) error LoadPlugins(v ...Plugin) error Emit(name string, v interface{}) Walk(func(manifest Manifest, v Plugin)) GetPlugins() []Plugin }
Handler defines a set of functions that can be used by plugins and the application see pkg/handler for implementation of interface
type Manifest ¶
type Manifest struct { Namespace string Description string Events map[string]func(event string, v interface{}) Config interface{} Data map[string]interface{} }
Manifest defines the requirements of a plugin to the handler
Click to show internal directories.
Click to hide internal directories.