ConcurrentRequests
Middlewares for tracking the quantity of concurrent requests.
These are generalized middlewares and can be used to implement metrics, logging, max concurrent requests, etc.
- Note:
The concurrent request count is decremented on the completion of the Response body, or in the event of any error, and is guaranteed to only occur once.
Value members
Concrete methods
Run a side effect each time the concurrent request count increments and decrements.
Run a side effect each time the concurrent request count increments and decrements.
- Note:
Each side effect is given the current number of concurrent requests as an argument.
onIncrement
should never be < 1 andonDecrement
should never be value < 0.
Run a side effect each time the concurrent request count increments and decrements.
Run a side effect each time the concurrent request count increments and decrements.
- Note:
Each side effect is given the current number of concurrent requests as an argument.
onIncrement
should never be < 1 andonDecrement
should never be value < 0.This is the same as app, but allows for the inner and outer effect types to differ.
Run a side effect each time the concurrent request count increments and decrements.
Run a side effect each time the concurrent request count increments and decrements.
- Note:
Each side effect is given the current number of concurrent requests as an argument.
onIncrement
should never be < 1 andonDecrement
should never be value < 0.
Run a side effect each time the concurrent request count increments and decrements.
Run a side effect each time the concurrent request count increments and decrements.
- Note:
Each side effect is given the current number of concurrent requests as an argument.
onIncrement
should never be < 1 andonDecrement
should never be value < 0.This is the same as route, but allows for the inner and outer effect types to differ.