Skip to main content

Module http_egress

Module http_egress 

Source
Expand description

Blocking HTTP egress for capability-gated plugin host functions.

Implements uni_plugin::HttpEgress with reqwest::blocking. The Rhai engine runs scripts synchronously inside DataFusion scalar/procedure execution, which is itself driven on Tokio worker threads — and reqwest::blocking panics if used from within a Tokio runtime context. So each request runs on a freshly-spawned OS thread (via std::thread::scope) that carries no Tokio context; the calling thread blocks on its join. URL allow-listing is enforced by the caller against the plugin’s granted uni_plugin::Capability::Network; this layer only honors the timeout and max_bytes it is handed.

Structs§

BlockingHttpEgress
reqwest::blocking-backed HttpEgress safe to call from async contexts.