← All compilation units

Flyology.HTTP.Server.Routing

Description

Raised after a unified listener's TCP or UDP serving task fails.

Abandon

procedure Abandon (Change : in out Update)

Discard an active candidate and return the update to its empty state. An update with no candidate is unchanged. Use this to give up on a candidate Commit rejected for a validation error.

Parameters
Change

Update to reset

Add

procedure Add
  (Item    : in out Router;
   Method  : String;
   Pattern : String;
   Handler : not null Handler_Access;
   Route   : out Route_ID;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register one route and return its stable runtime identity.

Parameters
Item

Router registry

Method

Case-sensitive HTTP method token

Pattern

Route path pattern

Handler

Application endpoint

Route

Assigned route identity

Name

Stable route name; empty derives Method and Pattern

Policy

Route-local application policy

Add

procedure Add
  (Item    : in out Router;
   Method  : String;
   Pattern : String;
   Handler : not null Handler_Access;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register one exact method and path pattern. Setup-only: this raises Route_Error once the router has dispatched.

Parameters
Item

Router registry

Method

Case-sensitive HTTP method token

Pattern

Static, {name}, or final {*name} path pattern

Handler

Application endpoint

Name

Stable route name; empty derives Method and Pattern

Policy

Route-local application policy

Raised exceptions
Route_Error

Item has already been mounted, so the route would not reach the copied routes

Add

procedure Add
  (Change  : in out Update;
   Method  : String;
   Pattern : String;
   Handler : not null Handler_Access;
   Route   : out Route_ID;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Add one route to an unpublished candidate.

Parameters
Change

Active candidate

Method

Case-sensitive HTTP method token

Pattern

Route path pattern

Handler

Application endpoint

Route

Assigned route identity

Name

Stable route name; empty derives Method and Pattern

Policy

Route-local application policy

Add_Middleware

procedure Add_Middleware
  (Item       : in out Router;
   Component  : not null Middleware_Access;
   Middleware : out Middleware_ID;
   Stage      : Middleware_Stage := Request_Head;
   Name       : String := "")

Append global middleware and return its runtime registration identity.

Parameters
Item

Router registry

Component

Around-handler component

Middleware

Assigned registration identity

Stage

Body-admission boundary for the component

Name

Optional stable diagnostic name for introspection

Add_Middleware

procedure Add_Middleware
  (Item      : in out Router;
   Component : not null Middleware_Access;
   Stage     : Middleware_Stage := Request_Head;
   Name      : String := "")

Append global middleware. Global components wrap every matched route in registration order and are copied into mounted subrouter routes.

Parameters
Item

Router registry

Component

Around-handler component

Stage

Body-admission boundary for the component

Name

Optional stable diagnostic name for introspection

Raised exceptions
Route_Error

Item has already been mounted, so the component would not reach the copied routes

Add_Middleware

procedure Add_Middleware
  (Change     : in out Update;
   Component  : not null Middleware_Access;
   Middleware : out Middleware_ID;
   Stage      : Middleware_Stage := Request_Head;
   Name       : String := "")

Add one global middleware registration to a candidate.

Parameters
Change

Active candidate

Component

Around-handler component

Middleware

Assigned registration identity

Stage

Body-admission boundary

Name

Optional diagnostic name

Add_Route_Middleware

procedure Add_Route_Middleware
  (Item            : in out Router;
   Route           : Route_ID;
   Component       : not null Middleware_Access;
   Middleware      : out Middleware_ID;
   Stage           : Middleware_Stage := Request_Head;
   Middleware_Name : String := "")

Append middleware to one route identity and return the registration identity. This setup-time overload avoids name lookup for applications that retain route identities.

Parameters
Item

Router registry

Route

Route receiving the component

Component

Around-handler component

Middleware

Assigned registration identity

Stage

Body-admission boundary for the component

Middleware_Name

Optional stable diagnostic name

Add_Route_Middleware

procedure Add_Route_Middleware
  (Item            : in out Router;
   Name            : String;
   Component       : not null Middleware_Access;
   Middleware      : out Middleware_ID;
   Stage           : Middleware_Stage := Request_Head;
   Middleware_Name : String := "")

Append middleware to one route selected by name and return its runtime registration identity.

Parameters
Item

Router registry

Name

Configured route name

Component

Around-handler component

Middleware

Assigned registration identity

Stage

Body-admission boundary for the component

Middleware_Name

Optional stable diagnostic name

Add_Route_Middleware

procedure Add_Route_Middleware
  (Item      : in out Router;
   Name      : String;
   Component : not null Middleware_Access;
   Stage     : Middleware_Stage := Request_Head;
   Middleware_Name : String := "")

Append middleware to one route selected by its unique configured name. Route-local components run after router-global components.

Parameters
Item

Router registry

Name

Configured route name

Component

Around-handler component

Stage

Body-admission boundary for the component

Middleware_Name

Optional stable diagnostic name

Raised exceptions
Route_Error

Item has already been mounted, so the component would not reach the copied routes

Add_Route_Middleware

procedure Add_Route_Middleware
  (Change          : in out Update;
   Route           : Route_ID;
   Component       : not null Middleware_Access;
   Middleware      : out Middleware_ID;
   Stage           : Middleware_Stage := Request_Head;
   Middleware_Name : String := "")

Add middleware to one candidate route.

Parameters
Change

Active candidate

Route

Route receiving the component

Component

Around-handler component

Middleware

Assigned registration identity

Stage

Body-admission boundary

Middleware_Name

Optional diagnostic name

Allow_SSE

Allow_SSE : constant Upgrade_Policy :=
  Flyology.HTTP.Server.Applications.Allow_SSE;

Permit an SSE lifecycle on the route.

Allow_WebSocket

Allow_WebSocket : constant Upgrade_Policy :=
  Flyology.HTTP.Server.Applications.Allow_WebSocket;

Permit a WebSocket lifecycle on the route.

App_Context

type App_Context is limited private;

Application context shared by routed handlers.

Authentication_Challenge

function Authentication_Challenge (Item : Router) return String

Return the configured fail-closed authentication challenge.

Parameters
Item

Router registry

Return value

WWW-Authenticate field value the backstop advertises

Authentication_Policy

subtype Authentication_Policy is
  Flyology.HTTP.Server.Applications.Authentication_Mode;

Authentication policy interpreted by authentication middleware.

Automatic_Concurrency

function Automatic_Concurrency (Item : Router) return Natural

Return the configured automatic-response concurrency bound.

Parameters
Item

Router registry

Return value

Maximum active automatic responses; zero is unlimited

Automatic_Rate_Per_Second

function Automatic_Rate_Per_Second (Item : Router) return Natural

Return the configured automatic-response per-client rate.

Parameters
Item

Router registry

Return value

Automatic responses per second; zero is unlimited

Begin_Update

procedure Begin_Update (Item : Router; Change : in out Update)

Clone the current immutable router generation into Change. Change must not already contain an uncommitted candidate.

Parameters
Item

Router whose current generation is the update base

Change

Empty update object receiving the candidate

Raised exceptions
Route_Error

Item has been mounted into another router

Cleartext_Policy

type Cleartext_Policy is (Serve_Cleartext, Redirect_To_HTTPS);

Policy for the cleartext endpoint of a unified HTTP/HTTPS server.

Enumeration literals
Serve_Cleartext

Route cleartext HTTP/1.x requests normally

Redirect_To_HTTPS

Redirect each request to the configured origin

Commit

procedure Commit (Item : in out Router; Change : in out Update)

Validate and atomically publish a complete candidate. A candidate whose base generation was already replaced can never be published, so Stale_Update also releases it and the same update object can be rebuilt from the newer generation. A candidate rejected by validation stays active so it can be corrected and committed again.

Parameters
Item

Router receiving the candidate

Change

Active candidate consumed on success

Raised exceptions
Stale_Update

Base generation was replaced first

Route_Error

Candidate is not a valid configuration

Components

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

Typed middleware API used by this router instance. Applications may also instantiate Server.Middleware independently of routing.

Default_Route_Policy

Default_Route_Policy : constant Route_Policy := (others => <>);

Baseline route policy: reject bodies and preserve the server deadline.

Delete

procedure Delete
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Route   : out Route_ID;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a DELETE route and return its stable runtime identity.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Route

Assigned route identity

Name

Stable route name

Policy

Route-local policy

Delete

procedure Delete
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a DELETE route.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Name

Stable route name

Policy

Route-local policy

Describe_Global_Middleware

function Describe_Global_Middleware
  (Item  : Router;
   Index : Positive) return Middleware_Description

Copy one global middleware description.

Parameters
Item

Router registry

Index

One-based registration index

Return value

Owned middleware metadata

Raised exceptions
Constraint_Error

Index is outside the configured range

Describe_Global_Middleware

function Describe_Global_Middleware
  (Item  : Snapshot;
   Index : Positive) return Middleware_Description

Copy one global middleware registration from the captured generation.

Parameters
Item

Captured generation

Index

Registration position in registration order

Return value

Owned copy of the registration

Raised exceptions
Constraint_Error

Index exceeds the captured count

Describe_Route

function Describe_Route
  (Item  : Router;
   Index : Positive) return Route_Description

Copy one configured route description.

Parameters
Item

Router registry

Index

One-based registration index

Return value

Owned route metadata that may outlive the router

Raised exceptions
Constraint_Error

Index is outside 1 .. Route_Count

Describe_Route

function Describe_Route
  (Item  : Snapshot;
   Index : Positive) return Route_Description

Copy one route's public configuration from the captured generation.

Parameters
Item

Captured generation

Index

Route position in registration order

Return value

Owned copy of the route's public configuration

Raised exceptions
Constraint_Error

Index exceeds the captured route count

Describe_Route_Middleware

function Describe_Route_Middleware
  (Item             : Router;
   Route_Index      : Positive;
   Middleware_Index : Positive) return Middleware_Description

Copy one route-local or mounted middleware description.

Parameters
Item

Router registry

Route_Index

One-based route registration index

Middleware_Index

One-based middleware index for that route

Return value

Owned middleware metadata

Raised exceptions
Constraint_Error

Either index is outside its configured range

Describe_Route_Middleware

function Describe_Route_Middleware
  (Item             : Snapshot;
   Route_Index      : Positive;
   Middleware_Index : Positive) return Middleware_Description

Copy one route-local middleware registration from the captured generation.

Parameters
Item

Captured generation

Route_Index

Route position in registration order

Middleware_Index

Component position within the route chain

Return value

Owned copy of the registration

Raised exceptions
Constraint_Error

Either index exceeds its captured count

Dispatch

procedure Dispatch
  (Item    : in out Router;
   Context : in out App_Context;
   X       : in out Applications.Exchange)

Match and invoke one protocol-neutral application exchange. Protocol engines use this overload after parsing and admitting a stream.

Parameters
Item

Router registry

Context

Typed shared application context

X

Borrowed request exchange

Dispatch

procedure Dispatch
  (Item       : in out Router;
   Context    : in out App_Context;
   Connection : aliased in out Flyology.HTTP.Server.Connection;
   Value      : aliased in out Request;
   Peer       : Flyology.IO.Sockets.Endpoint;
   Token      : access Flyology.Cancellation.Token := null;
   Alt_Svc    : String := "";
   Scheme     : Origin_Scheme := Plain_HTTP)

Match and invoke one already parsed request. Automatic 404, 405, HEAD fallback, slash handling, body policy, and deadline narrowing occur before the endpoint is called.

Parameters
Item

Router registry

Context

Typed shared application context

Connection

Sole-writer HTTP connection

Value

Parsed request head

Peer

Connected peer address

Token

Optional cancellation token

Alt_Svc

Optional HTTP/3 alternative-service field value

Scheme

Origin scheme used to receive the request

Find_Route

procedure Find_Route
  (Item  : Router;
   Name  : String;
   Route : out Route_ID;
   Found : out Boolean)

Resolve a unique configured route name to its runtime identity. The copied identity remains stable across updates until removal.

Parameters
Item

Router registry

Name

Configured route name

Route

Resolved identity, or No_Route when absent

Found

Whether Name identifies a route

Find_Route

procedure Find_Route
  (Item  : Snapshot;
   Name  : String;
   Route : out Route_ID;
   Found : out Boolean)

Resolve a route name within the captured generation.

Parameters
Item

Captured generation

Name

Configured route name

Route

Resolved identity, or No_Route when absent

Found

Whether Name identifies a route

Get

procedure Get
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Route   : out Route_ID;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a GET route and return its stable runtime identity.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Route

Assigned route identity

Name

Stable route name

Policy

Route-local policy

Get

procedure Get
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a GET route. HEAD falls back to it when no exact HEAD exists.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Name

Stable route name

Policy

Route-local policy

Global_Middleware_Count

function Global_Middleware_Count (Item : Router) return Natural

Return the number of global middleware registrations.

Parameters
Item

Router registry

Return value

Global middleware count in registration order

Global_Middleware_Count

function Global_Middleware_Count (Item : Snapshot) return Natural

Return the number of global components in the captured generation.

Parameters
Item

Captured generation

Return value

Number of global middleware registrations

Handler_Access

subtype Handler_Access is Components.Handler_Access;

Application endpoint invoked with the typed context and borrowed request exchange.

Head

procedure Head
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Route   : out Route_ID;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a HEAD route and return its stable runtime identity.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Route

Assigned route identity

Name

Stable route name

Policy

Route-local policy

Head

procedure Head
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register an explicit HEAD route.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Name

Stable route name

Policy

Route-local policy

Middleware_Access

subtype Middleware_Access is Components.Middleware_Access;

Around-handler component accepted by router middleware registration.

Middleware_Description

type Middleware_Description is record
   ID    : Middleware_ID;
   Name  : Ada.Strings.Unbounded.Unbounded_String;
   Stage : Middleware_Stage;
end record;

Immutable copy of one middleware registration. An empty name means the application used the source-compatible unnamed registration form.

Record fields
ID

Stable runtime middleware registration identity

Name

Application-provided diagnostic name

Stage

Body-admission boundary where the component runs

Middleware_ID

type Middleware_ID is private;

Opaque runtime identity of one middleware registration. The same component may be registered more than once and receives a distinct identity each time. Mounting copies a registration into the mounted routes without changing its identity, so one identity can name every copy of that registration.

Middleware_Stage

type Middleware_Stage is (Request_Head, Application);

Middleware execution boundary relative to request-body admission. The router's own fail-closed authentication backstop runs between the two stages, so a component that installs a principal must be registered at Request_Head; at Application it runs too late and every request to a Required_Authentication route is answered by the backstop instead.

Enumeration literals
Request_Head

Run before body acceptance and 100 Continue

Application

Run after the selected body policy is applied

Mount

procedure Mount
  (Item        : in out Router;
   Prefix      : String;
   Source      : in out Router;
   Name_Prefix : String := "")

Copy routes from Source under Prefix. Capacity is checked before any route is copied. Prefix must be a static path without parameters. Mounting snapshots Source, so Source is sealed against further route and middleware registration: a later registration on it raises rather than silently leaving the copied routes unprotected. Register everything on a subrouter before mounting it.

Parameters
Item

Destination router

Prefix

Static mount path

Source

Source subrouter, sealed by this call

Name_Prefix

Optional prefix for nonempty route names

No_Authentication

No_Authentication : constant Authentication_Policy :=
  Flyology.HTTP.Server.Applications.No_Authentication;

Route does not request authentication.

No_Middleware

No_Middleware : constant Middleware_ID;

Identity that does not designate middleware.

No_Route

No_Route : constant Route_ID;

Identity that does not designate a route.

No_Upgrade

No_Upgrade : constant Upgrade_Policy :=
  Flyology.HTTP.Server.Applications.No_Upgrade;

Ordinary HTTP responses only.

Optional_Authentication

Optional_Authentication : constant Authentication_Policy :=
  Flyology.HTTP.Server.Applications.Optional_Authentication;

Install a principal when valid credentials exist.

Options

procedure Options
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Route   : out Route_ID;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register an OPTIONS route and return its stable runtime identity.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Route

Assigned route identity

Name

Stable route name

Policy

Route-local policy

Options

procedure Options
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register an OPTIONS route.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Name

Stable route name

Policy

Route-local policy

Patch

procedure Patch
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Route   : out Route_ID;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a PATCH route and return its stable runtime identity.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Route

Assigned route identity

Name

Stable route name

Policy

Route-local policy

Patch

procedure Patch
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a PATCH route.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Name

Stable route name

Policy

Route-local policy

Post

procedure Post
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Route   : out Route_ID;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a POST route and return its stable runtime identity.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Route

Assigned route identity

Name

Stable route name

Policy

Route-local policy

Post

procedure Post
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a POST route.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Name

Stable route name

Policy

Route-local policy

Put

procedure Put
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Route   : out Route_ID;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a PUT route and return its stable runtime identity.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Route

Assigned route identity

Name

Stable route name

Policy

Route-local policy

Put

procedure Put
  (Item    : in out Router;
   Pattern : String;
   Handler : not null Handler_Access;
   Name    : String := "";
   Policy  : Route_Policy := Default_Route_Policy)

Register a PUT route.

Parameters
Item

Router registry

Pattern

Route path pattern

Handler

Application endpoint

Name

Stable route name

Policy

Route-local policy

Reclaim

procedure Reclaim (Item : in out Router)

Release every superseded generation and keep the published one. Retention is what keeps an in-flight dispatch and a live Snapshot reading valid storage, so the caller must know that no dispatch is in progress and that no snapshot of a superseded generation is still in use. This precondition is not checked. Call it on a drained server, between serving cycles.

Parameters
Item

Router registry

Remove

procedure Remove (Change : in out Update; Route : Route_ID)

Remove one route from an unpublished candidate. Its identity is never reused, including when the same name is subsequently registered.

Parameters
Change

Active candidate

Route

Route to remove

Raised exceptions
Route_Error

Route is not present in the candidate

Remove_Middleware

procedure Remove_Middleware
  (Change     : in out Update;
   Middleware : Middleware_ID)

Remove a middleware registration from the global chain and from every route chain that carries it, including chains a mount copied it into.

Parameters
Change

Active candidate

Middleware

Registration to remove

Rename

procedure Rename
  (Change : in out Update;
   Route  : Route_ID;
   Name   : String)

Replace one route's unique diagnostic and external lookup name.

Parameters
Change

Active candidate

Route

Route to rename

Name

Nonempty replacement name

Replace_Handler

procedure Replace_Handler
  (Change  : in out Update;
   Route   : Route_ID;
   Handler : not null Handler_Access)

Replace one route's endpoint while preserving its identity and match.

Parameters
Change

Active candidate

Route

Route to change

Handler

Replacement endpoint

Replace_Middleware

procedure Replace_Middleware
  (Change     : in out Update;
   Middleware : Middleware_ID;
   Component  : not null Middleware_Access)

Replace a middleware component while preserving its identity, stage, name, and position in every chain that references the registration.

Parameters
Change

Active candidate

Middleware

Registration to change

Component

Replacement around-handler component

Required_Authentication

Required_Authentication : constant Authentication_Policy :=
  Flyology.HTTP.Server.Applications.Required_Authentication;

Reject requests without valid credentials.

Retained_Generations

function Retained_Generations (Item : Router) return Natural

Return the number of configuration generations the router holds: the published generation plus every superseded generation it still keeps. Each Commit adds one, and the router releases them only at finalization or at Reclaim, so this count grows with the number of commits. Use it to observe that growth.

Parameters
Item

Router registry

Return value

Retained generation count, at least one

Route_Count

function Route_Count (Item : Router) return Natural

Return the number of configured routes without allocating. The result describes the generation current when this call takes its snapshot.

Parameters
Item

Router registry

Return value

Number of routes in registration order

Route_Count

function Route_Count (Item : Snapshot) return Natural

Return the number of routes in the captured generation.

Parameters
Item

Captured generation

Return value

Number of routes in registration order

Route_Description

type Route_Description is record
   ID               : Route_ID;
   Method           : Ada.Strings.Unbounded.Unbounded_String;
   Pattern          : Ada.Strings.Unbounded.Unbounded_String;
   Name             : Ada.Strings.Unbounded.Unbounded_String;
   Policy           : Route_Policy;
   Middleware_Count : Natural;
end record;

Immutable copy of one registered route's public configuration. Introspection snapshots the currently published generation and is not part of request dispatch.

Record fields
ID

Stable runtime route identity

Method

Configured HTTP method

Pattern

Configured path pattern

Name

Stable route name

Policy

Route-local application policy

Middleware_Count

Route-local or mounted middleware count

Route_Error

Route_Error : exception;

Invalid route registration or decoded request path.

Route_ID

type Route_ID is private;

Opaque runtime identity of one logical route. Identities are assigned by registration, remain stable across route updates, and are never reused after removal. They are meaningful only within this routing package instance and are not persistent deployment identifiers.

Route_Middleware_Count

function Route_Middleware_Count
  (Item        : Router;
   Route_Index : Positive) return Natural

Return route-local and mounted middleware count for one route.

Parameters
Item

Router registry

Route_Index

One-based route registration index

Return value

Middleware count in execution order after global components

Raised exceptions
Constraint_Error

Route_Index is outside the configured range

Route_Middleware_Count

function Route_Middleware_Count
  (Item        : Snapshot;
   Route_Index : Positive) return Natural

Return one route's middleware count in the captured generation.

Parameters
Item

Captured generation

Route_Index

Route position in registration order

Return value

Number of components attached to the route

Raised exceptions
Constraint_Error

Route_Index exceeds the captured count

Route_Policy

type Route_Policy is record
   Body_Handling   :
     Flyology.HTTP.Server.Applications.Request_Body_Policy :=
       Flyology.HTTP.Server.Applications.Reject_Body;
   Max_Body        : Body_Size := Max_Request_Body;
   Timeout         : Duration := -1.0;
   Concurrency     : Natural := 0;
   Rate_Per_Second : Natural := 0;
   Authentication  : Authentication_Policy := No_Authentication;
   CORS_Policy     : Natural := 0;
   Upgrade         : Upgrade_Policy := No_Upgrade;
end record;

Route-local policy consumed incrementally by optional toolkit layers. A zero concurrency or rate value means unlimited. CORS_Policy is an application-defined bounded registry slot interpreted by CORS middleware; zero means no CORS policy.

Record fields
Body_Handling

Request body handling

Max_Body

Maximum decoded body bytes

Timeout

Deadline narrowing in seconds; negative preserves it

Concurrency

Maximum active handlers; zero is unlimited

Rate_Per_Second

Per-client admission rate; zero is unlimited

Authentication

Route authentication requirement

CORS_Policy

Bounded application CORS policy slot

Upgrade

Permitted endpoint lifecycle

Router

type Router
  (Capacity : Positive := 64;
   Slashes  : Trailing_Slash_Policy := Strict_Slashes)
is tagged limited private;

Bounded route registry. Direct registration writes the published generation in place, so it belongs to application setup: the first dispatch seals the router and every direct registration or setter afterwards raises Route_Error. Use Begin_Update and Commit to change a serving router.

Record fields
Capacity

Maximum registered routes

Slashes

Explicit final-slash behavior

Serve

procedure Serve
  (Item         : in out Router;
   Context      : in out App_Context;
   Connection   : aliased in out Flyology.HTTP.Server.Connection;
   Peer         : Flyology.IO.Sockets.Endpoint;
   Timeout      : Duration := 30.0;
   Max_Connection_Age : Duration := 300.0;
   Max_Requests : Natural := 1_000;
   Token        : access Flyology.Cancellation.Token := null;
   Header_Timeout : Duration := -1.0;
   Alt_Svc      : String := "";
   Scheme       : Origin_Scheme := Plain_HTTP)

Read and route persistent requests until close or upgrade. This optional adapter leaves the lower-level Connection_Handlers package available.

Parameters
Item

Router registry

Context

Typed shared application context

Connection

Sole-writer HTTP connection

Peer

Connected peer address

Timeout

Original per-request deadline interval

Max_Connection_Age

Absolute lifetime bound for the connection; negative disables this additional bound

Max_Requests

Requests before connection close; zero is unlimited

Token

Optional cancellation token

Header_Timeout

Absolute slow-header budget for each request; negative uses the remaining request/connection lifetime

Alt_Svc

Optional HTTP/3 alternative-service field value

Scheme

Origin scheme used to receive each request

Serve

procedure Serve
  (Item               : in out Router;
   Context            : in out App_Context;
   Channel            : aliased in out Flyology.IO.Connections.Connection;
   Peer               : Flyology.IO.Sockets.Endpoint;
   Mode               : Protocol_Mode := HTTP_1_Only;
   Timeout            : Duration := 30.0;
   Max_Connection_Age : Duration := 300.0;
   Max_Requests       : Natural := 1_000;
   Token              : access Flyology.Cancellation.Token := null;
   Header_Timeout     : Duration := -1.0;
   Ingress            : access Ingress_Budget := null;
   Alt_Svc            : String := "";
   Scheme             : Origin_Scheme := Plain_HTTP)

Select HTTP/1.x or HTTP/2 for one accepted Flyology connection and serve it through this router. Route registration, middleware, body policy, and endpoint handlers are identical for both protocols. HTTP_2_Only expects cleartext prior knowledge or TLS already selected as h2. ALPN_Negotiated requires an upgraded ALPN-capable TLS channel and accepts only h2, http/1.1, or an empty fallback selection.

Parameters
Item

Router registry

Context

Typed shared application context

Channel

Sole owning plaintext or TLS Flyology connection

Peer

Connected peer address

Mode

Accepted-connection protocol policy

Timeout

Per-request or per-stream deadline interval

Max_Connection_Age

Absolute connection lifetime bound

Max_Requests

HTTP/1.x request limit; ignored for HTTP/2

Token

Optional cancellation token

Header_Timeout

HTTP/1.x slow-header budget; ignored for HTTP/2

Ingress

Optional HTTP/1.x retained-body budget

Alt_Svc

Optional HTTP/3 alternative-service field value

Scheme

Origin scheme used to receive each request

Serve

procedure Serve
  (Item                 : aliased in out Router;
   Context              : aliased in out App_Context;
   HTTP_Endpoint        : Flyology.IO.Sockets.Endpoint;
   HTTPS_Endpoint       : Flyology.IO.Sockets.Endpoint;
   HTTPS_Origin         : Origin;
   TLS_Backend          : aliased in out
     Flyology.IO.TLS.ALPN.Provider'Class;
   Certificate_DER      : Ada.Streams.Stream_Element_Array;
   Private_Key          : Flyology.QUIC.Connections.Ed25519_Private_Key;
   Cleartext            : Cleartext_Policy := Redirect_To_HTTPS;
   Cleartext_Capacity   : Positive := 64;
   TCP_Capacity         : Positive := 64;
   HTTP_3_Capacity      : Positive := 128;
   Transport_Settings   : Flyology.QUIC.Connections.Transport_Settings :=
     (others => <>);
   Timeout              : Duration := 30.0;
   Handshake_Timeout    : Duration := 10.0;
   Max_Connection_Age   : Duration := 300.0;
   TCP_Max_Requests     : Natural := 1_000;
   HTTP_3_Max_Requests  : Positive := 100_000;
   Header_Timeout       : Duration := -1.0;
   Ingress              : access Ingress_Budget := null;
   Alt_Svc_Max_Age      : Natural := 86_400;
   Drain_Timeout        : Duration := 30.0;
   Token                : not null access Flyology.Cancellation.Token;
   Handler_Model        : Flyology.Execution_Model :=
     Flyology.Project_Default)

Bind distinct cleartext HTTP/TCP and secure HTTPS TCP+UDP endpoints. HTTPS serves HTTP/1.1 and HTTP/2 over TLS plus HTTP/3 over QUIC. The cleartext endpoint either routes HTTP/1.x through the same application or sends a 308 redirect to HTTPS_Origin without trusting Host. The two endpoints must use the same address family and different concrete ports. Capacities are independent totals for cleartext TCP, secure TCP, and QUIC connections.

Parameters
Item

Router shared by all protocol workers

Context

Shared application context

HTTP_Endpoint

Cleartext HTTP/TCP endpoint

HTTPS_Endpoint

Secure TLS/TCP and QUIC/UDP endpoint

HTTPS_Origin

Configured public redirect origin

TLS_Backend

Initialized ALPN-capable TLS server provider

Certificate_DER

DER-encoded Ed25519 HTTP/3 certificate

Private_Key

Raw Ed25519 HTTP/3 private key

Cleartext

Cleartext routing or redirect policy

Cleartext_Capacity

Maximum concurrent cleartext connections

TCP_Capacity

Maximum concurrent secure H1/H2 connections

HTTP_3_Capacity

Maximum concurrent H3 connections

Transport_Settings

QUIC flow-control and stream limits

Timeout

Per-request or stream application deadline

Handshake_Timeout

TLS and QUIC handshake deadline

Max_Connection_Age

Per-connection lifetime

TCP_Max_Requests

HTTP/1.x persistent request limit

HTTP_3_Max_Requests

H3 request limit per connection

Header_Timeout

HTTP/1.x slow-header deadline

Ingress

Optional shared HTTP/1.x retained-body budget

Alt_Svc_Max_Age

Alt-Svc lifetime in seconds

Drain_Timeout

TCP handler drain after shutdown

Token

Required unified server shutdown source

Handler_Model

Fixed lightweight or native handler designation

Serve

procedure Serve
  (Item                 : aliased in out Router;
   Context              : aliased in out App_Context;
   IPv4_HTTP_Endpoint   : Flyology.IO.Sockets.Endpoint;
   IPv6_HTTP_Endpoint   : Flyology.IO.Sockets.Endpoint;
   IPv4_HTTPS_Endpoint  : Flyology.IO.Sockets.Endpoint;
   IPv6_HTTPS_Endpoint  : Flyology.IO.Sockets.Endpoint;
   HTTPS_Origin         : Origin;
   TLS_Backend          : aliased in out
     Flyology.IO.TLS.ALPN.Provider'Class;
   Certificate_DER      : Ada.Streams.Stream_Element_Array;
   Private_Key          : Flyology.QUIC.Connections.Ed25519_Private_Key;
   Cleartext            : Cleartext_Policy := Redirect_To_HTTPS;
   Cleartext_Capacity   : Positive := 64;
   TCP_Capacity         : Positive := 64;
   HTTP_3_Capacity      : Positive := 128;
   Transport_Settings   : Flyology.QUIC.Connections.Transport_Settings :=
     (others => <>);
   Timeout              : Duration := 30.0;
   Handshake_Timeout    : Duration := 10.0;
   Max_Connection_Age   : Duration := 300.0;
   TCP_Max_Requests     : Natural := 1_000;
   HTTP_3_Max_Requests  : Positive := 100_000;
   Header_Timeout       : Duration := -1.0;
   Ingress              : access Ingress_Budget := null;
   Alt_Svc_Max_Age      : Natural := 86_400;
   Drain_Timeout        : Duration := 30.0;
   Token                : not null access Flyology.Cancellation.Token;
   Handler_Model        : Flyology.Execution_Model :=
     Flyology.Project_Default)

Bind explicit IPv4 and IPv6 cleartext and secure endpoints. Each pair uses one shared port across address families, while HTTP and HTTPS use different ports. Capacity values are totals divided between families.

Parameters
Item

Router shared by all protocol workers

Context

Shared application context

IPv4_HTTP_Endpoint

IPv4 cleartext HTTP/TCP endpoint

IPv6_HTTP_Endpoint

IPv6 cleartext HTTP/TCP endpoint

IPv4_HTTPS_Endpoint

IPv4 TLS/TCP and QUIC/UDP endpoint

IPv6_HTTPS_Endpoint

IPv6 TLS/TCP and QUIC/UDP endpoint

HTTPS_Origin

Configured public redirect origin

TLS_Backend

Initialized ALPN-capable TLS server provider

Certificate_DER

DER-encoded Ed25519 HTTP/3 certificate

Private_Key

Raw Ed25519 HTTP/3 private key

Cleartext

Cleartext routing or redirect policy

Cleartext_Capacity

Total concurrent cleartext connections

TCP_Capacity

Total concurrent secure H1/H2 connections

HTTP_3_Capacity

Total concurrent H3 connections

Transport_Settings

QUIC flow-control and stream limits

Timeout

Per-request or stream application deadline

Handshake_Timeout

TLS and QUIC handshake deadline

Max_Connection_Age

Per-connection lifetime

TCP_Max_Requests

HTTP/1.x persistent request limit

HTTP_3_Max_Requests

H3 request limit per connection

Header_Timeout

HTTP/1.x slow-header deadline

Ingress

Optional shared HTTP/1.x retained-body budget

Alt_Svc_Max_Age

Alt-Svc lifetime in seconds

Drain_Timeout

TCP handler drain after shutdown

Token

Required unified server shutdown source

Handler_Model

Fixed lightweight or native handler designation

Serve

procedure Serve
  (Item                 : aliased in out Router;
   Context              : aliased in out App_Context;
   IPv4_Endpoint        : Flyology.IO.Sockets.Endpoint;
   IPv6_Endpoint        : Flyology.IO.Sockets.Endpoint;
   TLS_Backend          : aliased in out
     Flyology.IO.TLS.ALPN.Provider'Class;
   Certificate_DER      : Ada.Streams.Stream_Element_Array;
   Private_Key          : Flyology.QUIC.Connections.Ed25519_Private_Key;
   TCP_Capacity         : Positive := 64;
   HTTP_3_Capacity      : Positive := 128;
   Transport_Settings   : Flyology.QUIC.Connections.Transport_Settings :=
     (others => <>);
   Timeout              : Duration := 30.0;
   Handshake_Timeout    : Duration := 10.0;
   Max_Connection_Age   : Duration := 300.0;
   TCP_Max_Requests     : Natural := 1_000;
   HTTP_3_Max_Requests  : Positive := 100_000;
   Header_Timeout       : Duration := -1.0;
   Ingress              : access Ingress_Budget := null;
   Alt_Svc_Max_Age      : Natural := 86_400;
   Drain_Timeout        : Duration := 30.0;
   Token                : not null access Flyology.Cancellation.Token;
   Handler_Model        : Flyology.Execution_Model :=
     Flyology.Project_Default)

Bind explicit IPv4 and IPv6 endpoints concurrently, serving TLS/TCP HTTP/1.1 and HTTP/2 plus UDP HTTP/3 on both families. The endpoints must use the same concrete port so one Alt-Svc authority remains valid regardless of the address family selected by a client. Capacity values are totals divided between the two listeners; each must therefore admit at least two transports. Failure of either family stops the whole server. Route, context, TLS, certificate, timeout, and shutdown semantics are otherwise identical to the single-endpoint overload.

Parameters
Item

Router shared by all protocol workers

Context

Shared application context

IPv4_Endpoint

Concrete local IPv4 TCP and UDP endpoint

IPv6_Endpoint

Concrete local IPv6 TCP and UDP endpoint

TLS_Backend

Initialized ALPN-capable TLS server provider

Certificate_DER

DER-encoded Ed25519 HTTP/3 certificate

Private_Key

Raw Ed25519 HTTP/3 private key

TCP_Capacity

Total concurrent H1/H2 connections

HTTP_3_Capacity

Total concurrent H3 connections

Transport_Settings

QUIC flow-control and stream limits

Timeout

Per-request or stream application deadline

Handshake_Timeout

TLS and QUIC handshake deadline

Max_Connection_Age

Per-connection lifetime

TCP_Max_Requests

HTTP/1.x persistent request limit

HTTP_3_Max_Requests

H3 request limit per connection

Header_Timeout

HTTP/1.x slow-header deadline

Ingress

Optional shared HTTP/1.x retained-body budget

Alt_Svc_Max_Age

Alt-Svc lifetime in seconds

Drain_Timeout

TCP handler drain after shutdown

Token

Required unified server shutdown source

Handler_Model

Fixed lightweight or native handler designation

Serve

procedure Serve
  (Item                 : aliased in out Router;
   Context              : aliased in out App_Context;
   Endpoint             : Flyology.IO.Sockets.Endpoint;
   TLS_Backend          : aliased in out
     Flyology.IO.TLS.ALPN.Provider'Class;
   Certificate_DER      : Ada.Streams.Stream_Element_Array;
   Private_Key          : Flyology.QUIC.Connections.Ed25519_Private_Key;
   TCP_Capacity         : Positive := 64;
   HTTP_3_Capacity      : Positive := 128;
   Transport_Settings   : Flyology.QUIC.Connections.Transport_Settings :=
     (others => <>);
   Timeout              : Duration := 30.0;
   Handshake_Timeout    : Duration := 10.0;
   Max_Connection_Age   : Duration := 300.0;
   TCP_Max_Requests     : Natural := 1_000;
   HTTP_3_Max_Requests  : Positive := 100_000;
   Header_Timeout       : Duration := -1.0;
   Ingress              : access Ingress_Budget := null;
   Alt_Svc_Max_Age      : Natural := 86_400;
   Drain_Timeout        : Duration := 30.0;
   Token                : not null access Flyology.Cancellation.Token;
   Handler_Model        : Flyology.Execution_Model :=
     Flyology.Project_Default)

Bind one endpoint as TLS/TCP for HTTP/1.1 and HTTP/2 and as UDP for HTTP/3, then serve every protocol through this router until Token is requested. TLS_Backend must be a server provider configured to select h2 or http/1.1. H1/H2 responses advertise the active H3 endpoint with Alt-Svc; H3 responses do not. Mutable router context must synchronize access across concurrent protocol workers.

Parameters
Item

Router shared by all protocol workers

Context

Shared application context

Endpoint

Non-ephemeral local TCP and UDP endpoint

TLS_Backend

Initialized ALPN-capable TLS server provider

Certificate_DER

DER-encoded Ed25519 HTTP/3 certificate

Private_Key

Raw Ed25519 HTTP/3 private key

TCP_Capacity

Maximum concurrent H1/H2 connections

HTTP_3_Capacity

Maximum concurrent H3 connections

Transport_Settings

QUIC flow-control and stream limits

Timeout

Per-request or stream application deadline

Handshake_Timeout

TLS and QUIC handshake deadline

Max_Connection_Age

Per-connection lifetime

TCP_Max_Requests

HTTP/1.x persistent request limit

HTTP_3_Max_Requests

H3 request limit per connection

Header_Timeout

HTTP/1.x slow-header deadline

Ingress

Optional shared HTTP/1.x retained-body budget

Alt_Svc_Max_Age

Alt-Svc lifetime in seconds

Drain_Timeout

TCP handler drain after shutdown

Token

Required unified server shutdown source

Handler_Model

Fixed lightweight or native handler designation

Serve_HTTP_3

procedure Serve_HTTP_3
  (Item               : in out Router;
   Context            : in out App_Context;
   Socket             : aliased in out Flyology.IO.Sockets.Socket_Type;
   Certificate_DER    : Ada.Streams.Stream_Element_Array;
   Private_Key        : Flyology.QUIC.Connections.Ed25519_Private_Key;
   Source             : Flyology.QUIC.Connections.Connection_ID;
   Transport_Settings : Flyology.QUIC.Connections.Transport_Settings :=
     (others => <>);
   Timeout            : Duration := 30.0;
   Handshake_Timeout  : Duration := 10.0;
   Max_Connection_Age : Duration := 300.0;
   Max_Requests       : Positive := 100_000;
   Token              : access Flyology.Cancellation.Token := null)

Receive and serve one HTTP/3 connection with an application-supplied server connection identifier. This overload is intended for connection managers that own identifier generation.

Parameters
Item

Router registry

Context

Typed shared application context

Socket

Exclusively owned bound UDP socket

Certificate_DER

DER-encoded Ed25519 server certificate

Private_Key

Raw Ed25519 private key for Certificate_DER

Source

Fresh server source connection identifier

Transport_Settings

QUIC flow-control and stream limits

Timeout

Per-request application deadline

Handshake_Timeout

Maximum time to establish QUIC

Max_Connection_Age

Absolute connection lifetime

Max_Requests

Requests served before Serve_HTTP_3 returns

Token

Optional connection cancellation source

Serve_HTTP_3

procedure Serve_HTTP_3
  (Item               : in out Router;
   Context            : in out App_Context;
   Socket             : aliased in out Flyology.IO.Sockets.Socket_Type;
   Certificate_DER    : Ada.Streams.Stream_Element_Array;
   Private_Key        : Flyology.QUIC.Connections.Ed25519_Private_Key;
   Transport_Settings : Flyology.QUIC.Connections.Transport_Settings :=
     (others => <>);
   Timeout            : Duration := 30.0;
   Handshake_Timeout  : Duration := 10.0;
   Max_Connection_Age : Duration := 300.0;
   Max_Requests       : Positive := 100_000;
   Token              : access Flyology.Cancellation.Token := null)

Receive and serve one HTTP/3 connection on an exclusively owned bound UDP socket. Requests use the same routes, middleware, body policies, and application exchange helpers as HTTP/1.1 and HTTP/2. The server identity is an Ed25519 certificate and raw private key. A secure server connection identifier is generated for the connection.

Parameters
Item

Router registry

Context

Typed shared application context

Socket

Exclusively owned bound UDP socket

Certificate_DER

DER-encoded Ed25519 server certificate

Private_Key

Raw Ed25519 private key for Certificate_DER

Transport_Settings

QUIC flow-control and stream limits

Timeout

Per-request application deadline

Handshake_Timeout

Maximum time to establish QUIC

Max_Connection_Age

Absolute connection lifetime

Max_Requests

Requests served before Serve_HTTP_3 returns

Token

Optional connection cancellation source

Serve_HTTP_3_Listener

procedure Serve_HTTP_3_Listener
  (Item               : aliased in out Router;
   Context            : aliased in out App_Context;
   Socket             : aliased in out Flyology.IO.Sockets.Socket_Type;
   Certificate_DER    : Ada.Streams.Stream_Element_Array;
   Private_Key        : Flyology.QUIC.Connections.Ed25519_Private_Key;
   Capacity           : Positive := 128;
   Transport_Settings : Flyology.QUIC.Connections.Transport_Settings :=
     (others => <>);
   Timeout            : Duration := 30.0;
   Handshake_Timeout  : Duration := 10.0;
   Max_Connection_Age : Duration := 300.0;
   Max_Requests       : Positive := 100_000;
   Token              : not null access Flyology.Cancellation.Token)

Serve multiple concurrent HTTP/3 connections through this router on an unconnected bound UDP socket until Token is requested.

Parameters
Item

Router shared by all connection workers

Context

Shared application context; mutable parts synchronize

Socket

Exclusively owned bound UDP listener

Certificate_DER

DER-encoded Ed25519 server certificate

Private_Key

Raw Ed25519 private key for Certificate_DER

Capacity

Maximum concurrent QUIC connections

Transport_Settings

QUIC flow-control and stream limits

Timeout

Per-request application deadline

Handshake_Timeout

Maximum time to establish each QUIC connection

Max_Connection_Age

Per-connection lifetime

Max_Requests

Requests served by each connection

Token

Required listener shutdown and connection cancellation

Set_Authentication_Challenge

procedure Set_Authentication_Challenge
  (Item      : in out Router;
   Challenge : String)

Set the WWW-Authenticate challenge the router's own fail-closed backstop advertises when a Required_Authentication route is reached with no principal installed. The router cannot see the authentication middleware's own challenge, so an application that does not use Bearer must state its scheme here. The default is "Bearer". This direct setter is setup-only and raises Route_Error once the router has dispatched; use the Update overload after that.

Parameters
Item

Router registry

Challenge

Complete WWW-Authenticate field value

Raised exceptions
Route_Error

Challenge is empty or carries control bytes

Set_Authentication_Challenge

procedure Set_Authentication_Challenge
  (Change    : in out Update;
   Challenge : String)

Set the fail-closed authentication challenge in a candidate.

Parameters
Change

Active candidate

Challenge

Complete WWW-Authenticate field value

Set_Automatic_Admission

procedure Set_Automatic_Admission
  (Item            : in out Router;
   Concurrency     : Natural := 0;
   Rate_Per_Second : Natural := 0)

Set the per-client admission policy applied to the router's own automatic responses: 404, 405, CORS preflight, OPTIONS, the trailing slash redirect, and the malformed-path 400. Those responses match no route, so they carry no route policy of their own, yet they run the whole global middleware chain and write a response. Zero is unlimited and is the default, which leaves that surface unmetered. This direct setter is setup-only and raises Route_Error once the router has dispatched; use the Update overload after that.

Parameters
Item

Router registry

Concurrency

Maximum active automatic responses; zero is unlimited

Rate_Per_Second

Per-client automatic response rate; zero is unlimited

Set_Automatic_Admission

procedure Set_Automatic_Admission
  (Change          : in out Update;
   Concurrency     : Natural := 0;
   Rate_Per_Second : Natural := 0)

Set automatic-response admission policy in a candidate.

Parameters
Change

Active candidate

Concurrency

Maximum active automatic responses

Rate_Per_Second

Per-client automatic response rate

Set_Match

procedure Set_Match
  (Change  : in out Update;
   Route   : Route_ID;
   Method  : String;
   Pattern : String)

Replace one route's method and pattern together while preserving its identity. Whole-candidate ambiguity validation occurs during Commit.

Parameters
Change

Active candidate

Route

Route to change

Method

Replacement method token

Pattern

Replacement path pattern

Set_Middleware_Stage

procedure Set_Middleware_Stage
  (Change     : in out Update;
   Middleware : Middleware_ID;
   Stage      : Middleware_Stage)

Replace a middleware registration's body-admission stage.

Parameters
Change

Active candidate

Middleware

Registration to change

Stage

Replacement execution stage

Set_Policy

procedure Set_Policy
  (Change : in out Update;
   Route  : Route_ID;
   Policy : Route_Policy)

Replace one route's complete application policy.

Parameters
Change

Active candidate

Route

Route to change

Policy

Replacement route policy

Snapshot

type Snapshot is limited private;

Immutable view of one published generation. Every operation on one snapshot reads the same generation, so a count and the indexes taken from it stay consistent while another writer commits.

Stale_Update

Stale_Update : exception;

Raised when an update was built from a configuration generation that has since been replaced.

Take_Snapshot

procedure Take_Snapshot (Item : Router; Into : out Snapshot)

Capture the published generation for a consistent traversal. Each Router introspection call reads the generation published when that call runs, so a count from one call and an index used in the next can straddle a commit. Take one snapshot and traverse that instead.

Parameters
Item

Router registry

Into

Snapshot receiving the captured generation

Trailing_Slash_Policy

type Trailing_Slash_Policy is
  (Strict_Slashes, Ignore_Slashes, Redirect_Slashes);

Trailing slash treatment.

Enumeration literals
Strict_Slashes

Route pattern and target must agree

Ignore_Slashes

A final slash does not affect matching

Redirect_Slashes

Mismatches receive a permanent 308 redirect

Unified_Server_Error

Unified_Server_Error : exception;

Raised after a unified listener's TCP or UDP serving task fails.

Update

type Update is limited private;

Transactional candidate cloned from one published router generation. Mutations affect only the candidate until Commit atomically publishes it. A candidate based on a superseded generation is rejected.

Upgrade_Policy

subtype Upgrade_Policy is
  Flyology.HTTP.Server.Applications.Upgrade_Mode;

Upgrade permission for higher-level endpoint adapters.