ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.ResponseWait

Description

Open an upstream response under the sweeper's deadlines rather than http-client's own timers. A connection gets 30 seconds, and the status line and headers get what the connection left of them, counted from the end of the request body. http-client's retry of a stale pooled connection keeps what is left of the same 30 seconds. The faults are http-client's own ConnectionTimeout and ResponseTimeout, about one sweep late. Every registry exchange opens its response here. Amazonka's S3 calls and the OSV and EPSS fetches keep their own clients' timers.

Synopsis

Documentation

openResponse :: ExchangeClient -> Request -> IO (Response BodyReader) Source #

responseOpen under the response wait and the client's tracing. Close the response with responseClose.

withResponse :: ExchangeClient -> Request -> (Response BodyReader -> IO a) -> IO a Source #

withResponse under the response wait and the client's tracing.