Module monitored_mpsc

Source
Expand description

Provides wrappers to tokio mpsc channels, with metrics on total items sent, received and inflight.

Structs§

Permit
A newtype for an mpsc::Permit which allows us to inject gauge accounting in the case the permit is dropped w/o sending
Receiver
Wraps [mpsc::Receiver] with gauges counting the inflight and received items.
Sender
Wraps [mpsc::Sender] with gauges counting the sent and inflight items.
UnboundedReceiver
Wraps [mpsc::UnboundedReceiver] with gauges counting the inflight and received items.
UnboundedSender
Wraps [mpsc::UnboundedSender] with gauges counting the sent and inflight items.
WeakSender
Wraps [mpsc::WeakSender] with gauges counting the sent and inflight items.
WeakUnboundedSender
Wraps [mpsc::WeakUnboundedSender] with gauges counting the sent and inflight items.

Traits§

WithPermit
Sends a value into the channel using the held Permit. After successfully sending the value, it increments the sent gauge (if available) to reflect that an item has been sent.

Functions§

channel
Wraps [mpsc::channel()] to create a pair of Sender and Receiver
unbounded_channel
Wraps [mpsc::unbounded_channel()] to create a pair of UnboundedSender and UnboundedReceiver