Struct metrix::processor::TelemetryProcessor
[−]
[src]
pub struct TelemetryProcessor<L> { /* fields omitted */ }
The counterpart of the TelemetryTransmitter
. It receives the
Observation
s and other messages and processes them.
A TelemetryProcessor
is tied to a specific kind of label
which is used to determine which metrics are triggered.
The TelemetryProcessor<L>
owns a Receiver
for TelemetryMessage<L>
.
Methods
impl<L> TelemetryProcessor<L> where
L: Clone + Eq + Send + 'static,
[src]
L: Clone + Eq + Send + 'static,
fn new_pair<T: Into<String>>(
name: T
) -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
[src]
name: T
) -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
Creates a TelemetryTransmitter
and the corresponding TelemetryProcessor
The name
will cause a grouping in the Snapshot
.
fn new_pair_without_name() -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
[src]
Creates a TelemetryTransmitter
and the corresponding TelemetryProcessor
No grouping will occur unless the name is set.
fn add_cockpit(&mut self, cockpit: Cockpit<L>)
[src]
Add a Cockpit
fn cockpits(&self) -> Vec<&Cockpit<L>>
[src]
Returns all contained Cockpit
s
fn add_handler(&mut self, handler: Box<HandlesObservations<Label = L>>)
[src]
Add a (custom) handler for Observation
s.
fn handlers(&self) -> Vec<&HandlesObservations<Label = L>>
[src]
Returns all the handlers
fn add_snapshooter<S: PutsSnapshot>(&mut self, snapshooter: S)
[src]
Add a snapshooter that simply creates some Snapshot
defined
by it's internal logic. Usually it polls something when a
Snapshot
is requested.
fn snapshooters(&self) -> Vec<&PutsSnapshot>
[src]
fn name(&self) -> Option<&str>
[src]
fn set_name<T: Into<String>>(&mut self, name: T)
[src]
Sets the name which will cause a grouoing in the Snapshot
Trait Implementations
impl<L> ProcessesTelemetryMessages for TelemetryProcessor<L> where
L: Clone + Eq + Send + 'static,
[src]
L: Clone + Eq + Send + 'static,
fn process(&mut self, max: usize, drop_deadline: Instant) -> ProcessingOutcome
[src]
Receive and handle pending operations
impl<L> PutsSnapshot for TelemetryProcessor<L> where
L: Clone + Eq + Send + 'static,
[src]
L: Clone + Eq + Send + 'static,
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
[src]
Puts the current snapshot values into the given Snapshot
thereby following the guidelines of PutsSnapshot
. Read more