| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.ResponseWait.Internal
Description
The wait Ecluse.Core.Registry.ResponseWait keeps for each exchange, its pure transitions, and the opener under any length of wait. Importing this module opts out of the public surface's stability promises. It exists so a spec can test the transitions directly and open responses under a wait of a second or two.
Synopsis
- data ResponseWait
- connectedAt :: Word64 -> ResponseWait -> Either HttpExceptionContent Word64
- uploadingAt :: Word64 -> ResponseWait -> ResponseWait
- uploadedAt :: Word64 -> ResponseWait -> ResponseWait
- waitFault :: Word64 -> ResponseWait -> Maybe HttpExceptionContent
- openResponseAfter :: Word64 -> ExchangeClient -> Request -> IO (Response BodyReader)
- data WaitExpired = WaitExpired (IORef ()) HttpExceptionContent
Documentation
data ResponseWait Source #
Where an exchange stands, each with the monotonic nanoseconds that bound it: the connection's deadline, the wait an upload leaves for the headers, or the headers' deadline.
Instances
| Show ResponseWait Source # | |
Defined in Ecluse.Core.Registry.ResponseWait.Internal Methods showsPrec :: Int -> ResponseWait -> ShowS # show :: ResponseWait -> String # showList :: [ResponseWait] -> ShowS # | |
| Eq ResponseWait Source # | |
Defined in Ecluse.Core.Registry.ResponseWait.Internal | |
connectedAt :: Word64 -> ResponseWait -> Either HttpExceptionContent Word64 Source #
The wait the headers have left once a connection is in hand: what the connection left of the whole wait, or on http-client's retry of a stale connection, what the attempt before it left.
uploadingAt :: Word64 -> ResponseWait -> ResponseWait Source #
Pause the headers' deadline while a streamed body is written. A deadline already due stays due.
uploadedAt :: Word64 -> ResponseWait -> ResponseWait Source #
Start the headers' deadline again once the request body is written.
waitFault :: Word64 -> ResponseWait -> Maybe HttpExceptionContent Source #
The timeout an exchange takes at a monotonic time, if its wait ran out.
openResponseAfter :: Word64 -> ExchangeClient -> Request -> IO (Response BodyReader) Source #
responseOpen with a wait of this many nanoseconds in place of http-client's response timeout.
The wait ends once the headers are in, before the caller sees the response.
data WaitExpired Source #
Raised asynchronously, as http-client's own timer is, so a TLS handshake that wraps synchronous
faults passes it on. openResponseAfter turns it back into the client's fault.
Constructors
| WaitExpired (IORef ()) HttpExceptionContent |
Instances
| Exception WaitExpired Source # | |
Defined in Ecluse.Core.Registry.ResponseWait.Internal Methods toException :: WaitExpired -> SomeException # fromException :: SomeException -> Maybe WaitExpired # displayException :: WaitExpired -> String # backtraceDesired :: WaitExpired -> Bool # | |
| Show WaitExpired Source # | |
Defined in Ecluse.Core.Registry.ResponseWait.Internal Methods showsPrec :: Int -> WaitExpired -> ShowS # show :: WaitExpired -> String # showList :: [WaitExpired] -> ShowS # | |