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. - Unbounded
Receiver - Wraps [
mpsc::UnboundedReceiver
] with gauges counting the inflight and received items. - Unbounded
Sender - Wraps [
mpsc::UnboundedSender
] with gauges counting the sent and inflight items. - Weak
Sender - Wraps [
mpsc::WeakSender
] with gauges counting the sent and inflight items. - Weak
Unbounded Sender - Wraps [
mpsc::WeakUnboundedSender
] with gauges counting the sent and inflight items.
Traits§
- With
Permit - 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 ofSender
andReceiver
- unbounded_
channel - Wraps [
mpsc::unbounded_channel()
] to create a pair ofUnboundedSender
andUnboundedReceiver