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]
S::Address: Debug,
fn sender(&self) -> Sender<C, S>
Get the Sender
object to send data
Rules of thumb:
- Hold it only for sending data, not for fetching actual metrics
- 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]
S: ActiveStream,
fn clone(&self) -> Sink<C, S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more