Trait collectd_plugin::PluginManager[][src]

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

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. Must not contain null characters or panic.

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. Must not panic.

Initialize any socket, files, event loops, or any other resources that will be shared between multiple plugin instances.

Cleanup any resources or glodal data, allocated during initialize()

Implementors