pub struct WasmEdgeProcessor { /* private fields */ }Expand description
Advanced WASM edge computing processor
Implementations§
Source§impl WasmEdgeProcessor
impl WasmEdgeProcessor
Sourcepub fn new(config: WasmEdgeConfig) -> Result<Self>
pub fn new(config: WasmEdgeConfig) -> Result<Self>
Create new WASM edge processor
Sourcepub async fn register_plugin(&self, plugin: WasmPlugin) -> Result<()>
pub async fn register_plugin(&self, plugin: WasmPlugin) -> Result<()>
Register a WASM plugin
Sourcepub async fn execute_plugin(
&self,
plugin_id: &str,
events: Vec<StreamEvent>,
edge_location: Option<String>,
) -> Result<EdgeExecutionResult>
pub async fn execute_plugin( &self, plugin_id: &str, events: Vec<StreamEvent>, edge_location: Option<String>, ) -> Result<EdgeExecutionResult>
Execute plugin on edge location
Sourcepub async fn get_plugin_metrics(
&self,
plugin_id: &str,
) -> Option<PerformanceMetrics>
pub async fn get_plugin_metrics( &self, plugin_id: &str, ) -> Option<PerformanceMetrics>
Get plugin performance metrics
Sourcepub async fn list_plugins(&self) -> Vec<WasmPlugin>
pub async fn list_plugins(&self) -> Vec<WasmPlugin>
List all registered plugins
Sourcepub async fn hot_reload_plugin(
&self,
plugin_id: &str,
new_wasm_bytes: Vec<u8>,
) -> Result<()>
pub async fn hot_reload_plugin( &self, plugin_id: &str, new_wasm_bytes: Vec<u8>, ) -> Result<()>
Hot reload plugin
Sourcepub async fn unregister_plugin(&self, plugin_id: &str) -> Result<()>
pub async fn unregister_plugin(&self, plugin_id: &str) -> Result<()>
Unregister plugin
Sourcepub async fn load_plugin(&self, plugin: WasmPlugin) -> Result<()>
pub async fn load_plugin(&self, plugin: WasmPlugin) -> Result<()>
Load plugin (alias for register_plugin for API compatibility)
Sourcepub async fn process(
&mut self,
event: StreamEvent,
) -> Result<WasmProcessingResult>
pub async fn process( &mut self, event: StreamEvent, ) -> Result<WasmProcessingResult>
Process a single event using the processor
Sourcepub async fn process_at_location(
&self,
event: StreamEvent,
location: &EdgeLocation,
) -> Result<WasmProcessingResult>
pub async fn process_at_location( &self, event: StreamEvent, location: &EdgeLocation, ) -> Result<WasmProcessingResult>
Process event at a specific edge location
Sourcepub async fn hot_swap_plugin(
&self,
old_plugin_id: &str,
new_plugin: WasmPlugin,
) -> Result<()>
pub async fn hot_swap_plugin( &self, old_plugin_id: &str, new_plugin: WasmPlugin, ) -> Result<()>
Hot-swap plugin (alias for hot_reload_plugin for API compatibility)
Sourcepub async fn get_stats(&self) -> WasmProcessorStats
pub async fn get_stats(&self) -> WasmProcessorStats
Get processor statistics
Auto Trait Implementations§
impl !Freeze for WasmEdgeProcessor
impl !RefUnwindSafe for WasmEdgeProcessor
impl Send for WasmEdgeProcessor
impl Sync for WasmEdgeProcessor
impl Unpin for WasmEdgeProcessor
impl !UnwindSafe for WasmEdgeProcessor
Blanket Implementations§
Source§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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.