Struct metrix::processor::TelemetryProcessor[][src]

pub struct TelemetryProcessor<L> { /* fields omitted */ }

The counterpart of the TelemetryTransmitter. It receives the Observations 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>.

Implementations

impl<L> TelemetryProcessor<L> where
    L: Clone + Eq + Send + 'static, 
[src]

pub fn new_pair<T: Into<String>>(
    name: T
) -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
[src]

Creates a TelemetryTransmitter and the corresponding TelemetryProcessor

The name will cause a grouping in the Snapshot.

It is important that the returned TelemetryProcessor gets mounted on a driver soon since otherwise the internal queue will get flooded with unprocessed observations

pub fn new_pair_bounded<T: Into<String>>(
    name: T,
    cap: usize,
    block_on_full: bool
) -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
[src]

Creates a TelemetryTransmitter and the corresponding TelemetryProcessor

The name will cause a grouping in the Snapshot.

The message queue will be bound to cap elements. If block_on_full is false messages will be dropped if cap elements are in the queue.

pub 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.

It is important that the returned TelemetryProcessor gets mounted on a driver soon since otherwise the internal queue will get flooded with unprocessed observations

pub fn new_pair_bounded_without_name(
    cap: usize,
    block_on_full: bool
) -> (TelemetryTransmitter<L>, TelemetryProcessor<L>)
[src]

Creates a TelemetryTransmitter and the corresponding TelemetryProcessor

The name will cause a grouping in the Snapshot.

The message queue will be bound to cap elements. If block_on_full is false messages will be dropped if cap elements are in the queue.

pub fn add_cockpit(&mut self, cockpit: Cockpit<L>)[src]

Add a Cockpit

If the cockpit has a name and another cockpit with the same name is already present the cockpit will not be added.

pub fn cockpit(self, cockpit: Cockpit<L>) -> Self[src]

Add a Cockpit

If the cockpit has a name and another cockpit with the same name is already present the cockpit will not be added.

pub fn get_cockpits(&self) -> Vec<&Cockpit<L>>[src]

Returns all contained Cockpits

pub fn add_handler<T: HandlesObservations<Label = L>>(&mut self, handler: T)[src]

Add a (custom) handler for Observations.

pub fn handler<T: HandlesObservations<Label = L>>(self, handler: T) -> Self[src]

Add a (custom) handler for Observations.

pub fn get_handlers(&self) -> Vec<&dyn HandlesObservations<Label = L>>[src]

Returns all the handlers

pub 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.

pub fn snapshooter<S: PutsSnapshot>(self, snapshooter: S) -> Self[src]

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 get_snapshooters(&self) -> Vec<&dyn PutsSnapshot>[src]

pub fn get_name(&self) -> Option<&str>[src]

pub fn set_name<T: Into<String>>(&mut self, name: T)[src]

Sets the name which will cause a grouoing in the Snapshot

pub fn set_inactivity_limit(&mut self, limit: Duration)[src]

Sets the maximum amount of time this processor may be inactive until no more snapshots are taken

pub fn inactivity_limit(self, limit: Duration) -> Self[src]

Sets the maximum amount of time this processor may be inactive until no more snapshots are taken

pub fn set_show_activity_state(&mut self, show: bool)[src]

Set whether to show if the processor is inactive or not if inactivity_limit is set.

The default is true. Only has an effect if a inactivity_limit is set.

pub fn show_activity_state(self, show: bool) -> Self[src]

Set whether to show if the processor is inactive or not if inactivity_limit is set.

The default is true. Only has an effect if a inactivity_limit is set.

Trait Implementations

impl<L> Descriptive for TelemetryProcessor<L>[src]

impl<L> ProcessesTelemetryMessages for TelemetryProcessor<L> where
    L: Clone + Eq + Send + 'static, 
[src]

impl<L> PutsSnapshot for TelemetryProcessor<L> where
    L: Clone + Eq + Send + 'static, 
[src]

Auto Trait Implementations

impl<L> !RefUnwindSafe for TelemetryProcessor<L>

impl<L> Send for TelemetryProcessor<L> where
    L: Send

impl<L> !Sync for TelemetryProcessor<L>

impl<L> Unpin for TelemetryProcessor<L> where
    L: Unpin

impl<L> !UnwindSafe for TelemetryProcessor<L>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,