← All compilation units

Flyology.HTTP.Server.Middleware_Bulkheads

Description

Enforces nonblocking global and route concurrency limits.

App_Context

type App_Context is limited private;

Call

procedure Call
  (Context : in out App_Context;
   X       : in out Flyology.HTTP.Server.Applications.Exchange;
   Next    : in out Components.Next_Handler)

Nonblocking bulkhead middleware. Rejection is 503 with Retry-After.

Parameters
Context

Typed application context

X

Borrowed request exchange

Next

Borrowed downstream continuation

Components

with package Components is new
  Flyology.HTTP.Server.Middleware (App_Context);

Global_Limit

Global_Limit   : Natural := 0;

Metric_Output

Metric_Output  : access Metrics.Sink'Class := null;

Route_Capacity

Route_Capacity : Positive := 128;