Enum cernan::metric::Event[−][src]

pub enum Event {
    Telemetry(Telemetry),
    Log(LogLine),
    TimerFlush(u64),
    Shutdown,
    Raw {
        order_by: u64,
        encoding: Encoding,
        bytes: Vec<u8>,
    },
}

Event: the central cernan datastructure

Event is the heart of cernan, the enumeration that cernan works on in all cases. The enumeration fields drive sink / source / filter operations depending on their implementation.

Variants

A wrapper for metric::Telemetry. See its documentation for more detail.

A wrapper for metric::LogLine. See its documentation for more detail.

A flush pulse signal. The TimerFlush keeps a counter of the total flushes made in this cernan's run. See source::Flush for the origin of these pulses in cernan operation.

Shutdown event which marks the location in the queue after which no more events will appear. It is expected that after receiving this marker the given source will exit cleanly.

Raw, encoded bytes.

Fields of Raw

Ordering value used by some sinks accepting Raw events.

Encoding for the included bytes.

Encoded payload.

Methods

impl Event
[src]

Determine if an event is a TimerFlush.

Retrieve the timestamp from an Event if such exists. TimerFlush has no sensible timestamp -- being itself a mechanism of time, not inside time -- and these Events will always return None.

impl Event
[src]

Create a new Event::Telemetry from an existing metric::Telemetry.

Create a new Event::Log from an existing metric::LogLine.

Trait Implementations

impl PartialEq for Event
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Event
[src]

Formats the value using the given formatter. Read more

impl Clone for Event
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Event

impl Sync for Event