Skip to main content

Module engine

Module engine 

Source
Expand description

Policy compilation and graph execution.

Turns a PolicyConfig (nodes + from/to edges from gateway.yaml) into a CompiledGraph with instantiated plugins, then walks that graph per request: success edges on Ok, error edges (or the policy-level catch-all handler) on failure, stopping at terminal client nodes.

Structs§

BufferingReason
validate_policy tool both report to operators/agents.
CachePairWarning
Records that one node on an upstream’s success path forces buffering.
CompiledGraph
A compiled, ready-to-execute graph with instantiated plugins.

Functions§

compile_policy
Compiles a PolicyConfig into a ready-to-execute CompiledGraph.
infer_stream_capability 🔒
For each upstream node, walks only the success/outcome ports forward to see whether anything before client reads the response body.
parse_edge_endpoint 🔒
Parses "node_id.port" into (node_id, port), defaulting the port to "out" when no dot is present. Splits on the last dot, so node IDs may themselves contain dots.
validate_cache_pairs 🔒
Checks that every proxy-cache pair agrees about where it caches.