Skip to main content

Module proxy

Module proxy 

Source
Expand description

axum proxy — boot, manifest reload, Mode 1 dispatch, worker pool, and the P9 Mode 2 SSR slice (response cache + cache-key composition + session + source generations). Mode 3 dispatch is stubbed (501) — wired up in P10. See .yah/docs/architecture/mesofact.md §“IPC protocol” and §“Components”.

Modules§

cache
Mode 2 response cache — in-memory LRU keyed by the 7-input SHA-256 composition from .yah/docs/architecture/mesofact.md §“Cache-key composition”, with the fresh / stale (SWR) / expired state machine from §“Mode 2 caching beyond TTL”.
config
CLI configuration for the mesofact-proxy binary.
manifest_loader
Manifest loading: boot from a local file, plus SIGHUP-triggered reload and a 30-second heartbeat poll. Both signals push a new Arc<Manifest> through a tokio::sync::watch channel consumed by the router and worker pool.
metrics
Prometheus metrics for the proxy (/metrics exposition, scraped by yubaba).
router
axum router and request dispatch for the mesofact proxy.
session
Auth & session contract — the Rust proxy resolves req.user before render.
source_gen
Source generation tokens for cache-key input 6.
trace
W3C Trace Context (traceparent) generation + parsing for the proxy.
worker_client
WorkerClient — UDS connection to one Bun render-pool worker.
worker_pool
WorkerPool — manages N Bun render-pool workers.