2025-11-08 10:30:21 -07:00
|
|
|
mod server_runtime;
|
|
|
|
|
|
|
|
|
|
pub use server_runtime::ListenerRuntime;
|
2025-11-25 14:27:06 -07:00
|
|
|
|
|
|
|
|
use crate::{
|
|
|
|
|
ModuleError, ModuleRuntime,
|
|
|
|
|
config::{InterfaceWrapper, NamedComponent, RuntimeConfig},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
pub const COMPONENT_NAME: &'static str = "server";
|
|
|
|
|
|
|
|
|
|
fn get_interface() -> Option<&'static (dyn InterfaceWrapper + Sync)> {
|
|
|
|
|
None
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn start_runtime(config: &'static RuntimeConfig) -> Result<Box<dyn ModuleRuntime>, ModuleError> {
|
|
|
|
|
Ok(Box::new(ListenerRuntime::new(config)?))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub const fn get_named_component() -> NamedComponent {
|
|
|
|
|
NamedComponent {
|
|
|
|
|
name: COMPONENT_NAME,
|
|
|
|
|
get_interface: &get_interface,
|
|
|
|
|
start_runtime: &start_runtime,
|
|
|
|
|
}
|
|
|
|
|
}
|