Struct rotor_carbon::Sink [] [src]

pub struct Sink<C, S>(_, _)
where
    S: ActiveStream
;

This is a wrapper around the machinery to send data

Use sink.sender() go to get an actual object you may send to

Note sink.sender() holds lock on the underlying buffer and doesn't send data, until sender is dropped. This is useful for sending data in single bulk.

Methods

impl<C, S: ActiveStream> Sink<C, S> where
    S::Address: Debug
[src]

Get the Sender object to send data

Rules of thumb:

  1. Hold it only for sending data, not for fetching actual metrics
  2. If you poll for metrics in the loop, drop the sender while doing sleep()

Trait Implementations

impl<C: Clone, S: Clone> Clone for Sink<C, S> where
    S: ActiveStream
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more