Expand description
boatramp HTTP server + publishing API.
The server is backend-agnostic: it is handed a DeployStore (blobs in any
boatramp_core::Storage, metadata in any boatramp_core::kv::KvStore)
and exposes:
- a publishing API used by
boatramp sync— negotiate a manifest, upload missing blobs (streamed), then atomically activate; - public serving of the currently-active deployment for each site.
Every byte path streams: uploads flow request→backend, downloads flow backend→response, and only small manifests are ever held in memory.
Modules§
- envelope
- Secrets-at-rest envelope backends.
- signer
- External token signer backends: KMS / HSM / Vault-hosted
control-plane root keys behind the
boatramp_core::cose::Signerseam. ExternalSignerbackends for the control-plane token issuer. - sql_
shim - The compute sql-shim (PLAN-compute-bindings, Phase 0).
Structs§
- Auth
- Control-plane auth configuration: the token trust anchor (root public key)
plus the KV that holds the RBAC policy (
authz/policy) and revocation markers (authz/revoked/<id>).None⇒ auth disabled (development). - Daemon
Runtime - Handler
Runtime - The WebAssembly handler runtime: the shared engine plus the per-site binding
backends. Cheap to clone (it is an
Arcinside). Without thehandlersfeature it is an empty placeholder, so the serving signatures stay uniform — passHandlerRuntime::disabled. - Mesh
Member - One node’s Raft membership, reported by
GET /api/cluster/members. - Server
Limits - Server-tier upload limits. All
None= unlimited (the default; preserves the unbounded streaming behavior for operators who front boatramp with their own limits). - Server
Metrics - Always-on HTTP + lifecycle counters. Request cells are keyed by
(status_class, cache_result); the rest are scalar totals. - Server
Options - Server runtime knobs that aren’t part of the core (deploy, auth, handlers)
triple: operational request
limitsand an optional custom domain-ownershipDomainProbe(defaults to the live network probe). - Upload
Guard - Runtime guard built from
ServerLimits, shared across requests as an axum extension. Holds the concurrency semaphore (if any) and the per-upload caps.
Enums§
- Join
Outcome - The result of a join admission (
MeshControl::admit). - Serve
Error - A failure starting or running the HTTP server.
Traits§
- Mesh
Control - The cluster mesh control operations exposed to the control-plane API,
implemented by the cluster runtime over
ClusterNode;Noneon a non-cluster node (the routes then return501).
Functions§
- config_
baseline - The daemon-config file baseline derived from
ServerOptions(the resolvedboatramp.cfg).serveuses this to build aDaemonRuntimeit can wake on SIGHUP/changelog; the posture’s upload cap is the ceiling a dynamic override may not exceed. - http_
redirect_ router - A standalone router for a plain
:80listener that permanently redirects every request to its HTTPS equivalent. Bound alongside the HTTPS listener so plain-HTTP visitors are upgraded even when boatramp terminates TLS itself. - require_
auth - Axum middleware enforcing control-plane auth on the routes it wraps.
- router
- Build the application router around a
DeployStore,Authconfig, and the WebAssembly handler runtime (HandlerRuntime::disabledfor none), with defaultServerOptions(unlimited, live probe). - router_
with routerwith explicitServerOptions— lets a caller set request limits or inject a custom domain-ownership probe.- serve
- Bind
addrand serve until a shutdown signal (Ctrl-C / SIGTERM), then drain in-flight requests under [DRAIN_DEADLINE]. DefaultServerOptions. - serve_
with servewith explicitServerOptions(e.g. operational request limits).- server_
metrics - The process-wide
ServerMetrics. Cheap to call (no allocation). - shutdown_
signal - Resolve when the process receives Ctrl-C or SIGTERM, so in-flight requests can drain before exit.
- spawn_
compute_ reconcile - Spawn the leader-gated compute reconcile loop:
every
tick, whileis_leader(), run one [reconcile_once] pass over the backend registry + node inventory to converge each workload’s replicas. A no-op while not leader or with an empty registry. Detached for the server’s lifetime; the same leader-gating pattern as cron/cert issuance. - spawn_
domain_ verify_ reconcile - Spawn the domain-verification auto-complete reconcile loop: every
tick, on the leader, re-check all pending challenges and attach any that now pass — so a challenge whose HTTP/DNS token is published (e.g. bydomain add --provider) but never finished withdomain verifyself-heals with no operator action, and no persistent background daemon is needed beyond this tick. Mirrorscrate::spawn_compute_reconcile; the leader gate makes it a single-writer in a cluster. - verification_
pending_ page - The “verification pending” holding page — an HTTP 421 Misdirected Request
served for a non-local
Hostthat isn’t a verified, attached virtualhost (DV-2’s mandatory-verification gate). It looks up any pending challenge for the host to show the exact token / record + path; otherwise it shows generic guidance. Self-contained HTML (no JS, no external assets) — safe on an unverified host.
Type Aliases§
- Cron
Leader Gate - Predicate gating cron firing to the cluster leader (see
[
HandlerRuntime::set_cron_leader_gate]).