pub struct PluginRunner { /* private fields */ }Expand description
Holds compiled plugin modules and runs them per-request.
Created at config publish time from the gateway’s plugins list.
Cheap to clone (Arc internals). Each route’s plugins field names
the plugins to run; the proxy pipeline calls the runner’s phase
methods with those names.
Implementations§
Source§impl PluginRunner
impl PluginRunner
Sourcepub fn new(
plugins: &[PluginConfig],
resolved: &HashMap<String, PathBuf>,
) -> Result<Self, String>
pub fn new( plugins: &[PluginConfig], resolved: &HashMap<String, PathBuf>, ) -> Result<Self, String>
Build a runner from the gateway’s plugins list, compiling
each WASM plugin’s module. A local plugin loads from its
wasm: path; a registry source: plugin (DW-165) has no
wasm field and loads from its resolved, verified artifact
path in resolved (see crate::wasm::source). Plugins that
fail to compile are skipped (with a log warning); the gateway
starts even if a plugin is broken.
Sourcepub fn instantiate(&self, plugin_names: &[String]) -> Option<PluginInstances>
pub fn instantiate(&self, plugin_names: &[String]) -> Option<PluginInstances>
Create per-request instances for all plugins named on a route.
Returns None when no named plugin has a compiled module (the
caller treats that as fail-closed unavailability when the route
does reference WASM plugins — DW-157). A plugin whose module
fails to instantiate is skipped here with a warn; the caller is
expected to verify coverage via PluginInstances::contains.
Trait Implementations§
Source§impl Clone for PluginRunner
impl Clone for PluginRunner
Source§fn clone(&self) -> PluginRunner
fn clone(&self) -> PluginRunner
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PluginRunner
impl !RefUnwindSafe for PluginRunner
impl Send for PluginRunner
impl Sync for PluginRunner
impl Unpin for PluginRunner
impl !UnwindSafe for PluginRunner
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more