pub struct PluginNerveSystem { /* private fields */ }Expand description
Plugin-based system integration structure
This system uses the plugin manager to dynamically load and manage all Nerve Framework components as separate packages.
Implementations§
Source§impl PluginNerveSystem
impl PluginNerveSystem
Sourcepub fn new() -> NerveResult<Self>
pub fn new() -> NerveResult<Self>
Create a new plugin-based Nerve System with default configuration
Sourcepub fn with_config(config: SystemConfig) -> NerveResult<Self>
pub fn with_config(config: SystemConfig) -> NerveResult<Self>
Create a new plugin-based Nerve System with custom configuration
Sourcepub fn load_plugins(&mut self) -> NerveResult<()>
pub fn load_plugins(&mut self) -> NerveResult<()>
Load all required plugins based on configuration
Sourcepub fn memory_component(
&mut self,
) -> NerveResult<&Arc<dyn PluginMemoryComponent>>
pub fn memory_component( &mut self, ) -> NerveResult<&Arc<dyn PluginMemoryComponent>>
Get memory component (load if necessary)
Sourcepub fn thread_component(
&mut self,
) -> NerveResult<&Arc<dyn PluginThreadComponent>>
pub fn thread_component( &mut self, ) -> NerveResult<&Arc<dyn PluginThreadComponent>>
Get thread component (load if necessary)
Sourcepub fn node_component(&mut self) -> NerveResult<&Arc<dyn PluginNodeComponent>>
pub fn node_component(&mut self) -> NerveResult<&Arc<dyn PluginNodeComponent>>
Get node component (load if necessary)
Sourcepub fn communication_component(
&mut self,
) -> NerveResult<&Arc<dyn PluginCommunicationComponent>>
pub fn communication_component( &mut self, ) -> NerveResult<&Arc<dyn PluginCommunicationComponent>>
Get communication component (load if necessary)
Sourcepub fn plugin_manager(&self) -> &Arc<PluginManager>
pub fn plugin_manager(&self) -> &Arc<PluginManager>
Get plugin manager reference
Sourcepub fn config(&self) -> &SystemConfig
pub fn config(&self) -> &SystemConfig
Get system configuration
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Check if system is healthy
Sourcepub fn health_status(&self) -> String
pub fn health_status(&self) -> String
Get system health status
Sourcepub fn get_statistics(&self) -> SystemStatistics
pub fn get_statistics(&self) -> SystemStatistics
Get system statistics
Sourcepub fn loaded_plugin_types(&self) -> Vec<ComponentType>
pub fn loaded_plugin_types(&self) -> Vec<ComponentType>
Get loaded plugin types
Sourcepub fn plugin_count(&self) -> usize
pub fn plugin_count(&self) -> usize
Get plugin count
Sourcepub fn process_message(
&mut self,
topic: &str,
payload: Vec<u8>,
) -> NerveResult<()>
pub fn process_message( &mut self, topic: &str, payload: Vec<u8>, ) -> NerveResult<()>
Demonstrate plugin-based message processing
Sourcepub fn shutdown(self) -> NerveResult<()>
pub fn shutdown(self) -> NerveResult<()>
Shutdown the plugin-based system gracefully