Struct dipstick::Publisher
[−]
[src]
pub struct Publisher<E, M> { /* fields omitted */ }
Define and write metrics from aggregated scores to the target channel If this is called repeatedly it can be a good idea to use the metric cache to prevent new metrics from being created every time.
Methods
impl<E, M> Publisher<E, M> where
E: Fn(Kind, &str, ScoreType) -> Option<(Kind, Vec<&str>, Value)> + Send + Sync + 'static,
M: Clone + Send + Sync + 'static,
[src]
E: Fn(Kind, &str, ScoreType) -> Option<(Kind, Vec<&str>, Value)> + Send + Sync + 'static,
M: Clone + Send + Sync + 'static,
fn new(stat_fn: E, target_chain: Chain<M>) -> Self
[src]
Define a new metrics publishing strategy, from a transformation function and a target metric chain.
Trait Implementations
impl<E, M> Debug for Publisher<E, M> where
M: Debug,
[src]
M: Debug,
impl<E: Clone, M: Clone> Clone for Publisher<E, M>
[src]
fn clone(&self) -> Publisher<E, M>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<E, M> Publish for Publisher<E, M> where
M: Clone + Send + Sync + Debug + 'static,
E: Fn(Kind, &str, ScoreType) -> Option<(Kind, Vec<&str>, Value)> + Send + Sync + 'static,
[src]
M: Clone + Send + Sync + Debug + 'static,
E: Fn(Kind, &str, ScoreType) -> Option<(Kind, Vec<&str>, Value)> + Send + Sync + 'static,
fn publish(&self, snapshot: Vec<ScoreSnapshot>)
[src]
Publish the provided metrics data downstream.