Skip to main content

Module count_input

Module count_input 

Expand description

Input counting middleware.

This module provides a small middleware and layer for tracking how many inputs a service has processed in total and how many are currently being served concurrently.

The core concepts are:

The tracker allows any inner service to observe:

  • The live number of concurrent inputs
  • The total number of inputs seen so far
  • The sequence number of the current input

Structs§

CountInput
Service that counts total and concurrent inputs and exposes a tracker via extensions.
CountInputLayer
A Layer that produces CountInput services.
DefaultInputCounter
Default counter implementation based on atomics.
InputCounterExtension
The default tracker extension inserted into input extensions by CountInput when using DefaultInputCounter.

Traits§

InputCounter
A counter used by CountInput to track total and concurrent inputs.
InputCounterTracker
Tracks per input counters and exposes them as an extension.