Trait prometheus::local::MayFlush[][src]

pub trait MayFlush: LocalMetric {
    fn may_flush(&self);

    fn try_flush(&self, last_flush: &Cell<u64>, flush_interval_millis: u64) { ... }
}

An interface models a LocalMetric with try to flush functions. Not intend to be implemented by user manually, used in macro generated code.

Required methods

fn may_flush(&self)[src]

Open to implementation to fill try_flush parameters

Loading content...

Provided methods

fn try_flush(&self, last_flush: &Cell<u64>, flush_interval_millis: u64)[src]

If the LocalMetric is already flushed in last flush_interval_sec seconds, then do nothing, else flush and update last flush time.

Loading content...

Implementors

Loading content...