Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PluginConfigPath = path.Join(settings.ConfigPath, "plugins-enabled")
PluginConfigPath - XXX
View Source
var Plugins = map[string]PluginRegistry{}
Plugins - XXX
Functions ¶
func ReadPluginConfig ¶
ReadPluginConfig - Reads the file from the expected path and returns it as bytes
func UmarshalPluginConfig ¶
UmarshalPluginConfig - Converts bytes to interface
Types ¶
type ConfiguredPlugin ¶
ConfiguredPlugin - XXX
type Plugin ¶
type Plugin interface {
// Description returns a one-sentence description on the Plugin
Description() string
SampleConfig() string
// Collects all the metrics and returns a struct with the results
Collect() (interface{}, error)
// Start starts the service - Optional
Start() error
// Stop stops the services and closes any necessary channels and connections - Optional
Stop()
}
Plugin - XXX
type PluginConfig ¶
PluginConfig - XXX
func GetAllEnabledPlugins ¶
func GetAllEnabledPlugins() ([]PluginConfig, error)
GetAllEnabledPlugins - XXX
func GetConfigPath ¶
func GetConfigPath(plugin string) (PluginConfig, error)
GetConfigPath - Simple function that generates the plugin config path for the current distro
Click to show internal directories.
Click to hide internal directories.