Module everywhere

Module everywhere 

Source
Expand description

CEL everywhere (DW-059).

One CEL surface across four use-sites, following the APISIX expr/Kong expressions-router precedent of a single expression language rather than a bespoke DSL per feature.

§Use-sites

  1. Expression matchers in routes – a CEL expression that evaluates to a bool; if true, the route matches.
  2. Header/transform logic – a CEL expression that evaluates to a string; the result is used as the header value.
  3. Rate-limit key derivation – a CEL expression that evaluates to a string; the result is used as the rate-limit key (e.g. request.headers["x-api-key"]).
  4. Policy conditions – a CEL expression that evaluates to a bool; if true, the policy applies.

§Request context

All four use-sites share the same request context: a request variable with path, method, headers, query, host fields. This is the standard CEL request variable that the gateway populates per-request.

§Feature gate

The cel cargo feature must be enabled (this module builds on the DW-058 CEL engine).

Structs§

HeaderTransform
A CEL-based header transform expression.
PolicyCondition
A CEL-based policy condition.
RateLimitKey
A CEL-based rate-limit key derivation expression.
RequestContext
The standard request context for CEL evaluation.
RouteCondition
A CEL-based route match condition.

Enums§

CelUseSite
The kind of CEL use-site.

Functions§

compile_for
Compile a CEL expression for a specific use-site.
evaluate_for
Evaluate a CEL program for a specific use-site, checking the result type.