Skip to main content

liminal/routing/function/
mod.rs

1//! Routing function loading and supervised execution (ADR-003).
2//!
3//! This module is the boundary that wraps the beamr runtime for the flexible
4//! tier of the two-tier routing model. Routing functions are content-addressed
5//! modules: they are loaded by content hash (so re-loading identical bytecode
6//! reuses the already-loaded module) and executed in supervised, isolated
7//! processes. A panic or runaway loop in one routing function is contained by
8//! the supervisor and surfaced to the caller as an error, never propagated to
9//! the evaluation pipeline of other channels.
10//!
11//! Beamr types are intentionally not exposed here; callers interact only with
12//! the wrapper types defined in this module. The [`loader`] submodule wraps
13//! content-hash module loading and hot deployment; the [`execute`] submodule
14//! wraps supervised, isolated execution.
15
16pub mod execute;
17pub mod loader;
18
19pub use execute::{
20    ConsumerId, ConsumerStateView, FunctionError, RoutingDecision, RoutingMessage,
21    SupervisedExecutor,
22};
23pub use loader::{ContentHash, ModuleLoader, RoutingFunction, RoutingModule, RoutingSlot};