pub struct PluginManager { /* private fields */ }Expand description
Plugin manager.
Implementations§
Source§impl PluginManager
impl PluginManager
Sourcepub async fn discover_plugins(&self) -> Result<Vec<PluginMetadata>, AppError>
pub async fn discover_plugins(&self) -> Result<Vec<PluginMetadata>, AppError>
Discover plugins in the plugin directory.
Sourcepub async fn load_plugin(&self, plugin_id: &str) -> Result<(), AppError>
pub async fn load_plugin(&self, plugin_id: &str) -> Result<(), AppError>
Load a plugin.
Sourcepub async fn start_plugin(&self, plugin_id: &str) -> Result<(), AppError>
pub async fn start_plugin(&self, plugin_id: &str) -> Result<(), AppError>
Start a plugin.
Sourcepub async fn stop_plugin(&self, plugin_id: &str) -> Result<(), AppError>
pub async fn stop_plugin(&self, plugin_id: &str) -> Result<(), AppError>
Stop a plugin.
Sourcepub async fn unload_plugin(&self, plugin_id: &str) -> Result<(), AppError>
pub async fn unload_plugin(&self, plugin_id: &str) -> Result<(), AppError>
Unload a plugin.
Sourcepub async fn execute_command(
&self,
command: &str,
_args: Value,
) -> Result<Value, AppError>
pub async fn execute_command( &self, command: &str, _args: Value, ) -> Result<Value, AppError>
Execute plugin command.
Sourcepub async fn broadcast_event(
&self,
event: &str,
_data: Value,
) -> Result<(), AppError>
pub async fn broadcast_event( &self, event: &str, _data: Value, ) -> Result<(), AppError>
Broadcast event to plugins.
Sourcepub async fn get_plugins(&self) -> Vec<Plugin>
pub async fn get_plugins(&self) -> Vec<Plugin>
Get all plugins.
Sourcepub async fn get_plugin(&self, plugin_id: &str) -> Option<Plugin>
pub async fn get_plugin(&self, plugin_id: &str) -> Option<Plugin>
Get plugin by ID.
Auto Trait Implementations§
impl Freeze for PluginManager
impl !RefUnwindSafe for PluginManager
impl Send for PluginManager
impl Sync for PluginManager
impl Unpin for PluginManager
impl !UnwindSafe for PluginManager
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].