MuninNodePlugin

Trait MuninNodePlugin 

Source
pub trait MuninNodePlugin {
    // Required methods
    fn config(&self);
    fn run(&self);

    // Provided methods
    fn check_autoconf(&self) -> bool { ... }
    fn autoconf(&self) { ... }
    fn get_env_threshold(level: Level, field: &str) -> Option<String> { ... }
    fn get_env_threshold_as<T>(level: Level, field: &str) -> Option<T>
       where T: FromStr { ... }
    fn print_if_env(level: Level, field: &str) { ... }
    fn start(&self) -> i32 { ... }
}

Required Methods§

Source

fn config(&self)

Source

fn run(&self)

Provided Methods§

Source

fn check_autoconf(&self) -> bool

Source

fn autoconf(&self)

Source

fn get_env_threshold(level: Level, field: &str) -> Option<String>

Source

fn get_env_threshold_as<T>(level: Level, field: &str) -> Option<T>
where T: FromStr,

Source

fn print_if_env(level: Level, field: &str)

Examples found in repository?
examples/load.rs (line 33)
24        fn config(&self) {
25            println!(r#"graph_title Load average
26graph_args --base 1000 -l 0
27graph_vlabel load
28graph_scale no
29graph_category system
30graph_info Load average (written in Rust)
31{0}.label load
32{0}.info 5 minutes average"#, FIELD);
33            Self::print_if_env(Level::Warning, FIELD);
34            Self::print_if_env(Level::Critical, FIELD);
35        }
Source

fn start(&self) -> i32

Plugin entry point

Examples found in repository?
examples/load.rs (line 51)
49fn main() {
50    let plugin = load::LoadPlugin::new();
51    std::process::exit(plugin.start());
52}

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§