pub async fn actor<RT, H, E>(
    ctx: Context<ServiceMessage, RT>,
    health_check: H
) -> Result<()>where
    RT: Access + Clone,
    H: FnMut() -> Result<(), E>,
    E: ToString,
Available on Linux only.
Expand description

Actor that manages the communication to the service manager.

It will set the application state (with the service manager) to ready when it is spawned. Once it receives a signal (in the form of a message) it will set the state to stopping.

Finally it will ping the service manager if a watchdog is active. It will check using health_check on the current status of the application.