ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Exchange.Types

Description

The handle every upstream exchange runs through, shared by the composition root that builds it and the exchanges that read it.

Synopsis

Documentation

data ExchangeClient Source #

One connection pool, the process's deadline sweeper, and the tracing of each exchange, built once at startup for each pool. Every exchange needs all three, so they travel together.

Constructors

ExchangeClient 

Fields

  • ecManager :: Manager

    The http-client pool the exchange's connection comes from.

  • ecDeadlines :: Deadlines

    The process's sweeper: the progress floor, the serve-path cap, the request timeout and the response wait.

  • ecTrace :: TraceExchange

    Runs once around each exchange, from the request to the response headers.

type TraceExchange = Request -> (Request -> IO (Response BodyReader)) -> IO (Response BodyReader) Source #

Open one response through the opener, handing it the request with any headers the tracing adds.

untracedExchange :: TraceExchange Source #

Open the response with no client span, for a store the Dredger reads or a process without telemetry.