Trait collectd_plugin::PluginManager [] [src]

pub trait PluginManager {
    fn name() -> &'static str;
fn plugins(
        _config: Option<&[ConfigItem]>
    ) -> Result<PluginRegistration, Error>; fn capabilities() -> PluginManagerCapabilities { ... }
fn initialize() -> Result<(), Error> { ... } }

Defines the entry point for a collectd plugin. Based on collectd's configuration, a PluginManager will register any number of plugins (or return an error)

Required Methods

Name of the plugin.

Returns one or many instances of a plugin that is configured from collectd's configuration file. If parameter is None, a configuration section for the plugin was not found, so default values should be used.

Provided Methods

Defines the capabilities of the plugin manager.

Initialize any socket, files, or expensive resources that may have been parsed from the configuration. If an error is reported, all hooks registered will be unregistered. This is really only useful for PluginRegistration::Single modules who want global data.

Implementors