ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Exchange.Observe

Description

Observe HTTP attempts without taking ownership of their responses. Callers admit local work first and report headers before consuming the body. Attempt notification precedes header writes and does not prove remote receipt. Connection failures can occur before that notification. The injected recorder must not throw.

Synopsis

Documentation

data ExchangeOutcome Source #

A response status or an interruption before response headers arrive.

observeExchange :: (ExchangeOutcome -> IO ()) -> Request -> (Request -> (Status -> IO ()) -> IO a) -> IO a Source #

Keep response ownership in the continuation. Report its headers before reading its body.