pub async fn run_daemon_loop<H>(
config: DaemonConfig,
handler: H,
) -> Result<(), PluginError>where
H: DaemonHandler,Expand description
Run the daemon event loop
This function:
- Sets up the socket listener
- Calls
on_starton the handler - Runs the main event loop, handling:
- Incoming client connections
- Periodic tick events
- Calls
on_shutdownwhen the daemon exits
§Arguments
config- Daemon configuration (socket path, intervals, etc.)handler- The daemon handler implementing the business logic
§Returns
Returns an error if socket setup fails or a fatal error occurs.