The single admission path shared by every gateway protocol adapter.
admit/2 runs, in order and before any backend connection:
- canonical route and path checks (
/,/1.0,/1.0/*; no dot segments, NUL or backslash, raw or percent-encoded; an encoded/inside a segment stays, as image aliases need it); - native selection parsing from the raw query, rejecting duplicate or
malformed
project,targetandall-projectsvalues; - bounded admission;
- host readiness;
- host authorization.
Each host callback runs in its own monitored process under the gateway's
callback_timeout and is killed at the deadline, so a slow callback can never
authorize later. Protocols not implemented by this gateway revision fail
after authorization with an explicit 501.
Summary
Functions
Admit a request for holder. Returns {:ok, %Admitted{}} holding one
admission slot, or {:error, failure} with no backend contact.
Shared bounded expiry/revocation check; never obtains another grant.
Release an admitted exchange's slot.
Build a request from adapter-supplied fields. Returns {:ok, request} or
{:error, failure} without contacting the host or backend.
Functions
Admit a request for holder. Returns {:ok, %Admitted{}} holding one
admission slot, or {:error, failure} with no backend contact.
Shared bounded expiry/revocation check; never obtains another grant.
Release an admitted exchange's slot.
Build a request from adapter-supplied fields. Returns {:ok, request} or
{:error, failure} without contacting the host or backend.