| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Progress
Description
Bound registry transfers by body progress during upstream waits. Consumer time and waits for response headers do not count.
Synopsis
- data Watch
- watched :: Deadlines -> ProgressFloor -> (Watch -> IO a) -> IO (Maybe a)
- watchedRaising :: Deadlines -> ProgressFloor -> (Watch -> IO a) -> IO a
- isProgressFloorFailure :: SomeException -> Bool
- meteredReader :: Watch -> BodyReader -> BodyReader
- meteredUpload :: Watch -> RequestBody -> RequestBody
The progress floor
One transfer's progress in the current window, shared by its meters and the sweeper's check.
watched :: Deadlines -> ProgressFloor -> (Watch -> IO a) -> IO (Maybe a) Source #
Return Nothing below the floor. The catch outlives the check, so its interruption cannot escape later.
watchedRaising :: Deadlines -> ProgressFloor -> (Watch -> IO a) -> IO a Source #
Raise a floor failure so an already committed response tears down. It lands about one sweep late.
isProgressFloorFailure :: SomeException -> Bool Source #
Identify the floor's transport-timeout interruption without exposing its constructor.
Metered transfers
meteredReader :: Watch -> BodyReader -> BodyReader Source #
A reader whose every read counts as a wait on the upstream, and its chunk as progress.
meteredUpload :: Watch -> RequestBody -> RequestBody Source #
Count each slice once written. An empty body has no upload to watch.