Immutable configuration for the optional native Incus gateway.
A host mounts Opsmaru.Incus.Gateway.Plug in its own router/endpoint and
passes a gateway built here. Construction is passive: it validates values and
performs no I/O, starts no process and opens no backend. Loading or
configuring :opsmaru_incus never starts a listener, whatever PHX_SERVER or
PORT say.
Fields:
:connection- the fixed host-selectedOpsmaru.Incus.Connection. Request fields can never replace it.:host- a module implementingOpsmaru.Incus.Gateway.Host. It verifies callers, readiness and authority. Without it nothing is relayed.:host_config- opaque host term passed to every callback; redacted.:admission- the name or pid of a host-startedOpsmaru.Incus.Gateway.Admission. A missing or stopped admission denies.:recheck_interval- maximum active expiry/revocation latency in ms, including callback and interruption budgets (default/maximum 5000). Hosts may tighten it to 4..5000 ms.:max_identity_bytes- bounded discovery/trust/server-identity bodies (default 1 MiB, maximum 4 MiB).:callback_timeout- per host callback budget in ms (default 1000).:idle_timeout- longest silence from the backend or caller in ms (default: the connection'sstream_timeout).:max_lifetime- absolute budget for one relayed exchange in ms (default 1 hour).:max_request_bytes/:max_response_bytes- body budgets (default: the connection'smax_stream_bytes).:max_chunk_bytes- largest body chunk read at once (default: the connection'smax_chunk_bytes).:max_header_bytes- request header budget (default 64 KiB).
The HTTP Plug and its relay compile only when Plug is available; client-only consumers need neither Plug nor Cowboy.
Summary
Functions
Validate an immutable gateway configuration without any I/O.
Types
@type t() :: %Opsmaru.Incus.Gateway{ admission: term(), callback_timeout: term(), connection: term(), host: term(), host_config: term(), idle_timeout: term(), max_chunk_bytes: term(), max_header_bytes: term(), max_identity_bytes: term(), max_lifetime: term(), max_request_bytes: term(), max_response_bytes: term(), recheck_interval: term() }