dwara_core/dataplane/mod.rs
1//! Dataplane bounded context: the request-serving path.
2//!
3//! Assembles the reverse-proxy core ([`proxy`]), pooled upstream clients
4//! ([`upstream`], with the RFC 8305 happy-eyeballs dial of DW-030),
5//! per-upstream load balancing ([`balance`]), active health probing
6//! ([`active`] — it drives the upstream registry's balancer trackers,
7//! which is dataplane lifecycle), DNS-based dynamic upstream discovery
8//! ([`discovery`] — DW-042, background tasks that resolve and watch
9//! DNS records, updating the endpoint set live), config convergence
10//! (`convergence` — DW-054, ent feature only, background task that
11//! polls a shared backend so instances converge to the highest
12//! generation and drift is reported), the protocol
13//! hardening applied to
14//! every serving surface ([`hardening`], plus the route-scoped request
15//! limits of DW-027), the PROXY protocol acceptance of DW-030
16//! ([`proxy_proto`]), the route-scoped response edge policies of DW-027
17//! ([`cors`], [`compression`]), the API versioning aids of DW-048
18//! ([`versioning`]), the request/response transforms and
19//! security-header injection of DW-028 ([`transforms`]), and the local
20//! response cache of DW-037 ([`response_cache`], behind the
21//! `extensions::cache::CacheStore` seam), and the AI proxy action of
22//! DW-075 ([`ai_proxy`], which drives the `ai` domain's adapters over
23//! the provider's upstream). This is the top of the core
24//! dependency graph: it may depend on every other domain; nothing
25//! depends on it.
26
27pub mod active;
28pub mod ai_proxy;
29pub mod anomaly;
30pub mod balance;
31pub mod canary;
32pub mod compression;
33pub mod cors;
34// DW-054: config convergence coordinator (ent feature only). The
35// module compiles only when the `ent` cargo feature is enabled; OSS
36// builds never pull in the redis dependency. Lives in the dataplane
37// (the top of the core dependency graph) because it orchestrates the
38// snapshot publish pipeline + the convergence backend trait +
39// observability, and `snapshot` may not import `extensions`.
40#[cfg(feature = "ent")]
41pub mod convergence;
42// DW-099: GraphQL awareness (query depth/complexity limits +
43// persisted-query enforcement). Feature-gated behind the `graphql`
44// cargo feature; the module compiles only when the feature is enabled.
45// The config schema is always present (so configs round-trip without
46// the feature), but the runtime check is feature-gated.
47pub mod discovery;
48// DW-101: gRPC-Web framing translation + JSON-to-gRPC transcoding.
49// Feature-gated behind the `grpc_web` cargo feature; the module
50// compiles only when the feature is enabled. The config schema is
51// always present (so configs round-trip without the feature), but the
52// runtime translation is feature-gated.
53pub mod graphql;
54pub mod grpc_web;
55pub mod hardening;
56// DW-106: WASM route handlers (nano-services). Feature-gated behind
57// the `nano_services` cargo feature (which pulls in `wasm`); the module
58// compiles only when the feature is enabled. The config schema is
59// always present (so configs round-trip without the feature), but the
60// runtime handler is feature-gated. When the feature is off the action
61// is accepted but inert (validation warns, the route returns 502).
62pub mod nano_service;
63// DW-157: request-path plugin dispatch. Wires the route `plugins`
64// list into the live request path — the fail-closed health gate over
65// the plugin lifecycle, per-request WASM instantiation, the unified
66// plugin chain (native + WASM in config order), and the four phase
67// points (request_headers before authn, request_body before the
68// action, response_headers before masking, response_body after
69// masking). Compiles unconditionally; routes without plugins take the
70// untouched fast path.
71pub mod plugin_dispatch;
72pub mod proxy;
73pub mod proxy_proto;
74// DW-102: replay time-travel debugging (pure decision replayer).
75pub mod replay;
76pub mod response_cache;
77pub mod split;
78// DW-100: protocol translation framework. The general
79// ProtocolTranslator trait + the REST<->GraphQL translator compile
80// under the `protocol_translation` cargo feature (which implies
81// `grpc_web` so the REST<->gRPC translator reuses the DW-101 engine).
82// The SOAP/XML translator is further gated behind the `soap` feature
83// for binary size. The config schema is always present (so configs
84// round-trip without the feature), but the runtime translation is
85// feature-gated.
86pub mod transforms;
87pub mod translation;
88pub mod translation_graphql;
89pub mod translation_soap;
90// DW-103: L4 TCP/UDP proxying with SNI routing reuse. Feature-gated
91// behind the `l4` cargo feature; the module compiles only when the
92// feature is enabled. The config schema (ListenerProtocol::Tcp/Udp +
93// L4Config) is always present so configs round-trip without the
94// feature, but the runtime dispatcher is feature-gated. When the
95// feature is off, validation warns that the listener is inert.
96pub mod l4;
97pub mod upstream;
98// DW-108: HTTP/3 (QUIC) upstream transport. Feature-gated behind the
99// `h3` cargo feature; the module compiles only when the feature is
100// enabled (it pulls in quinn + h3 + h3-quinn). When the feature is off,
101// `protocol: h3` upstreams are accepted at validation but inert (every
102// dispatch fails closed with UpstreamError::H3Unavailable).
103pub mod upstream_h3;
104pub mod versioning;
105pub mod waf;
106pub mod websocket;