pub struct PluginManager { /* private fields */ }Expand description
Manages the lifecycle and execution of all plugins.
This struct provides centralized plugin management including registration, lifecycle management, and execution coordination. It ensures plugins are executed in the correct order and handles plugin failures gracefully.
Implementations§
Source§impl PluginManager
impl PluginManager
pub fn new() -> Self
pub async fn register_plugin( &mut self, plugin: Plugin, ) -> Result<(), GatewayError>
pub async fn get_plugin_metadata(&self, name: &str) -> Option<PluginMetadata>
pub async fn list_plugins(&self) -> Vec<PluginMetadata>
pub async fn stop_plugin(&self, name: &str) -> Result<(), GatewayError>
pub async fn stop_all_plugins(&self) -> Result<(), GatewayError>
pub async fn before_request( &self, request: &mut Request<Body>, ) -> Result<(), GatewayError>
pub async fn after_response( &self, response: &mut Response<Body>, ) -> Result<(), GatewayError>
pub async fn on_error(&self, error: &GatewayError) -> Result<(), GatewayError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PluginManager
impl !UnwindSafe for PluginManager
impl Freeze for PluginManager
impl Send for PluginManager
impl Sync for PluginManager
impl Unpin for PluginManager
impl UnsafeUnpin 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