pub struct WasmModuleManager { /* private fields */ }Implementations§
Source§impl WasmModuleManager
impl WasmModuleManager
pub fn new(config: WasmRuntimeConfig) -> Self
pub fn with_default_config() -> Self
Sourcepub fn register_module_internal(&self, module: WasmModule) -> Result<()>
pub fn register_module_internal(&self, module: WasmModule) -> Result<()>
Register a module (for workflow steps)
Sourcepub fn remove_module_internal(&self, module_uuid: Uuid) -> Result<()>
pub fn remove_module_internal(&self, module_uuid: Uuid) -> Result<()>
Remove a module (for workflow steps)
pub fn check_duplicate_sha256_hash(&self, sha256_hash: &[u8; 32]) -> Result<()>
pub fn get_all_modules(&self) -> Result<Vec<WasmModule>>
pub fn get_module(&self, module_uuid: Uuid) -> Result<Option<WasmModule>>
pub fn get_modules(&self) -> Result<Vec<WasmModule>>
Sourcepub fn get_modules_by_attach_point(
&self,
attach_point: WasmModuleAttachPoint,
) -> Result<Vec<WasmModule>>
pub fn get_modules_by_attach_point( &self, attach_point: WasmModuleAttachPoint, ) -> Result<Vec<WasmModule>>
get modules by attach point
pub fn get_runtime(&self) -> &Arc<WasmRuntime>
Sourcepub fn get_max_body_size(&self) -> usize
pub fn get_max_body_size(&self) -> usize
Get the configured maximum body size for HTTP request/response processing
Sourcepub async fn execute_module_interface(
&self,
module_uuid: Uuid,
attach_point: WasmModuleAttachPoint,
input: WasmComponentInput,
) -> Result<WasmComponentOutput>
pub async fn execute_module_interface( &self, module_uuid: Uuid, attach_point: WasmModuleAttachPoint, input: WasmComponentInput, ) -> Result<WasmComponentOutput>
Execute WASM module using WebAssembly component model based on attach_point
Sourcepub fn execute_module_interface_sync(
&self,
module_uuid: Uuid,
attach_point: WasmModuleAttachPoint,
input: WasmComponentInput,
) -> Result<WasmComponentOutput>
pub fn execute_module_interface_sync( &self, module_uuid: Uuid, attach_point: WasmModuleAttachPoint, input: WasmComponentInput, ) -> Result<WasmComponentOutput>
Execute WASM module using WebAssembly component model (sync version)
Sourcepub async fn execute_module_for_attach_point(
&self,
module: &WasmModule,
attach_point: WasmModuleAttachPoint,
input: WasmComponentInput,
) -> Option<MiddlewareAction>
pub async fn execute_module_for_attach_point( &self, module: &WasmModule, attach_point: WasmModuleAttachPoint, input: WasmComponentInput, ) -> Option<MiddlewareAction>
Execute a WASM module for a given attach point Returns the Action if successful, or None if execution failed
This is a convenience method that wraps execute_module_interface and handles error logging automatically.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WasmModuleManager
impl !RefUnwindSafe for WasmModuleManager
impl Send for WasmModuleManager
impl Sync for WasmModuleManager
impl Unpin for WasmModuleManager
impl UnsafeUnpin for WasmModuleManager
impl !UnwindSafe for WasmModuleManager
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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 more