25 releases
| new 0.2.41 | Nov 28, 2025 |
|---|---|
| 0.2.40 | Nov 27, 2025 |
| 0.2.39 | Oct 27, 2025 |
| 0.2.23 | Sep 30, 2025 |
| 0.1.0 | Sep 26, 2025 |
#22 in #pingora
569 downloads per month
Used in 2 crates
(via cardinal-rs)
220KB
5.5K
SLoC
cardinal-proxy
Pingora integration for Cardinal. CardinalProxy implements ProxyHttp and delegates request/response processing to the rest of the stack.
Key pieces
CardinalContextProvider: resolves anArc<CardinalContext>from aSession. The defaultStaticContextProvideralways returns the same context; more advanced deployments can plug in host-aware providers.RequestContext: per-request cache of the resolved context, destination backend, andPluginRunner.- Middleware execution:
PluginRunner::run_request_filters/run_response_filtersare invoked at the right phases, so both Rust and WASM middleware can observe or mutate traffic.
Lifecycle
- Provider resolves a context.
DestinationContainerselects the backend based on path/host.- Request middleware runs; it can short-circuit with
MiddlewareResult::Responded. - Pingora connects to the upstream origin.
- Response middleware runs; optional logging is performed.
Consumers rarely touch this crate directly—Cardinal handles wiring—but understanding it is useful when implementing custom providers or debugging proxy behaviour.
Dependencies
~36–55MB
~1M SLoC