Module iota_metrics::monitored_mpsc

source ·
Expand description

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

Structs§

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

Traits§

  • 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§

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