Struct goodmetrics::downstream::GoodmetricsDownstream
source · pub struct GoodmetricsDownstream<TChannel> { /* private fields */ }
Expand description
A downstream that sends metrics to a goodmetricsd
or other goodmetrics grpc server.
Implementations§
source§impl<TChannel> GoodmetricsDownstream<TChannel>
impl<TChannel> GoodmetricsDownstream<TChannel>
sourcepub fn new(
channel: TChannel,
shared_dimensions: impl IntoIterator<Item = (impl Into<String>, impl Into<Dimension>)>,
) -> Self
pub fn new( channel: TChannel, shared_dimensions: impl IntoIterator<Item = (impl Into<String>, impl Into<Dimension>)>, ) -> Self
Create a new goodmetrics sender from a grpc channel
sourcepub async fn send_batches_forever(self, receiver: Receiver<Vec<Datum>>)
pub async fn send_batches_forever(self, receiver: Receiver<Vec<Datum>>)
Spawn this on a tokio runtime to send your metrics to your downstream receiver
Auto Trait Implementations§
impl<TChannel> !Freeze for GoodmetricsDownstream<TChannel>
impl<TChannel> RefUnwindSafe for GoodmetricsDownstream<TChannel>where
TChannel: RefUnwindSafe,
impl<TChannel> Send for GoodmetricsDownstream<TChannel>where
TChannel: Send,
impl<TChannel> Sync for GoodmetricsDownstream<TChannel>where
TChannel: Sync,
impl<TChannel> Unpin for GoodmetricsDownstream<TChannel>where
TChannel: Unpin,
impl<TChannel> UnwindSafe for GoodmetricsDownstream<TChannel>where
TChannel: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request