Expand description
synapse-proxy library surface (used by the binary and integration tests).
Re-exports§
pub use builder::ProxyBuilder;
Modules§
- admin
- Admin surface (separate listener): push/clear the context overlay.
- builder
- Compile parsed config + a transform registry into ready-to-serve routes.
The binary uses built-ins only; library consumers register custom transforms
by name before
build(). - config
- Proxy config: listeners, context sources, and routes with transform steps.
- context
- Bound context: a generalized key→value bag the proxy injects into forwarded requests. A permanent base (static ⊕ env, built at startup with env winning) is overlaid by an optional pushed binding with a TTL; pushed keys win while live and the overlay reverts on expiry. Single active binding.
- health
- Liveness/readiness probes. Readiness flips to 503 once shutdown begins so load balancers drain this instance before in-flight requests finish.
- metrics
- OpenTelemetry metrics exported in Prometheus text format on /metrics.
- proxy
- Reverse-proxy pipeline: match (path_prefix + methods) → resolve context (gate require_context) → request transforms → forward (stream/hop-by-hop/cap) → response transforms → stream/replace.
- transform
- The transform pipeline: traits a request/response step implements, the mutable request/response views they operate on, and the registry of code-registered custom transforms.
Functions§
- build_
router - build_
router_ from_ config - Build the data-plane router from a builder (used by integration tests).