mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
Feature/tor health checks (#426)
* wip * wraps up core tor health check feature, still need to fix the boundaries with the rest of embassyd * need to please borrow checker * please the borrow checker * wire it in * finishes the feature * Apply suggestions from code review * fixes tor restart functionality * makes tor replacement more resilient, adds embassyd service in init and replace
This commit is contained in:
committed by
GitHub
parent
e304995c7f
commit
3160da6e9f
@@ -66,6 +66,8 @@ async fn inner_main(cfg_path: Option<&str>) -> Result<(), Error> {
|
||||
}
|
||||
});
|
||||
|
||||
let tor_health_check_task =
|
||||
embassy::daemon::tor_health_check::tor_health_check_daemon(&rpc_ctx.net_controller.tor);
|
||||
let ws_ctx = rpc_ctx.clone();
|
||||
let ws_server = {
|
||||
let builder = Server::bind(&ws_ctx.bind_ws);
|
||||
@@ -136,6 +138,7 @@ async fn inner_main(cfg_path: Option<&str>) -> Result<(), Error> {
|
||||
e.context("Health Check daemon panicked!"),
|
||||
ErrorKind::Unknown
|
||||
)),
|
||||
futures::FutureExt::map(tor_health_check_task, Ok)
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user