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]
impl<L> TelemetryProcessor<L> where
L: Clone + Eq + Send + 'static,
pub fn new_pair<T: Into<String>>(
name: T
) -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
[src]
pub fn new_pair<T: Into<String>>(
name: T
) -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
Creates a TelemetryTransmitter
and the corresponding
TelemetryProcessor
The name
will cause a grouping in the Snapshot
.
pub fn new_pair_without_name(
) -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
[src]
pub fn new_pair_without_name(
) -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
Creates a TelemetryTransmitter
and the corresponding
TelemetryProcessor
No grouping will occur unless the name is set.
pub fn add_cockpit(&mut self, cockpit: Cockpit<L>)
[src]
pub fn add_cockpit(&mut self, cockpit: Cockpit<L>)
Add a Cockpit
pub fn cockpits(&self) -> Vec<&Cockpit<L>>
[src]
pub fn cockpits(&self) -> Vec<&Cockpit<L>>
Returns all contained Cockpit
s
pub fn add_handler(&mut self, handler: Box<HandlesObservations<Label = L>>)
[src]
pub fn add_handler(&mut self, handler: Box<HandlesObservations<Label = L>>)
Add a (custom) handler for Observation
s.
pub fn handlers(&self) -> Vec<&HandlesObservations<Label = L>>
[src]
pub fn handlers(&self) -> Vec<&HandlesObservations<Label = L>>
Returns all the handlers
pub fn add_snapshooter<S: PutsSnapshot>(&mut self, snapshooter: S)
[src]
pub fn add_snapshooter<S: PutsSnapshot>(&mut self, snapshooter: S)
Add a snapshooter that simply creates some Snapshot
defined
by it's internal logic. Usually it polls something when a
Snapshot
is requested.
pub fn snapshooters(&self) -> Vec<&PutsSnapshot>
[src]
pub fn snapshooters(&self) -> Vec<&PutsSnapshot>
pub fn name(&self) -> Option<&str>
[src]
pub fn name(&self) -> Option<&str>
pub fn set_name<T: Into<String>>(&mut self, name: T)
[src]
pub fn set_name<T: Into<String>>(&mut self, name: T)
Sets the name which will cause a grouoing in the Snapshot
pub fn set_inactivity_limit(&mut self, limit: Duration)
[src]
pub fn set_inactivity_limit(&mut self, limit: Duration)
Sets the maximum amount of time this processor may be inactive until no more snapshots are taken
Trait Implementations
impl<L> ProcessesTelemetryMessages for TelemetryProcessor<L> where
L: Clone + Eq + Send + 'static,
[src]
impl<L> ProcessesTelemetryMessages for TelemetryProcessor<L> where
L: Clone + Eq + Send + 'static,
fn process(&mut self, max: usize, drop_deadline: Instant) -> ProcessingOutcome
[src]
fn process(&mut self, max: usize, drop_deadline: Instant) -> ProcessingOutcome
Receive and handle pending operations
impl<L> PutsSnapshot for TelemetryProcessor<L> where
L: Clone + Eq + Send + 'static,
[src]
impl<L> PutsSnapshot for TelemetryProcessor<L> where
L: Clone + Eq + Send + 'static,
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
[src]
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
Puts the current snapshot values into the given Snapshot
thereby following the guidelines of PutsSnapshot
. Read more
impl<L> Descriptive for TelemetryProcessor<L>
[src]
impl<L> Descriptive for TelemetryProcessor<L>
Auto Trait Implementations
impl<L> Send for TelemetryProcessor<L> where
L: Send,
impl<L> Send for TelemetryProcessor<L> where
L: Send,
impl<L> !Sync for TelemetryProcessor<L>
impl<L> !Sync for TelemetryProcessor<L>