Skip to main content

Module manager

Module manager 

Source

Re-exportsยง

use std::panic::AssertUnwindSafe; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::sync::atomic::AtomicUsize; ๐Ÿ”’
use std::sync::atomic::Ordering; ๐Ÿ”’
use std::time::Duration; ๐Ÿ”’
use futures::FutureExt; ๐Ÿ”’
use futures::TryFutureExt; ๐Ÿ”’
use tokio::sync::Mutex; ๐Ÿ”’
use tokio::sync::MutexGuard; ๐Ÿ”’
use tokio::task::JoinHandle; ๐Ÿ”’
use tokio::task::JoinSet; ๐Ÿ”’
use tokio::task::yield_now; ๐Ÿ”’
use tokio::time::sleep; ๐Ÿ”’
use tuwunel_core::Err; ๐Ÿ”’
use tuwunel_core::Error; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::Server; ๐Ÿ”’
use tuwunel_core::debug; ๐Ÿ”’
use tuwunel_core::debug; ๐Ÿ”’
use tuwunel_core::debug::INFO_SPAN_LEVEL; ๐Ÿ”’
use tuwunel_core::debug_warn; ๐Ÿ”’
use tuwunel_core::defer; ๐Ÿ”’
use tuwunel_core::error; ๐Ÿ”’
use tuwunel_core::error; ๐Ÿ”’
use tuwunel_core::utils::time; ๐Ÿ”’
use tuwunel_core::warn; ๐Ÿ”’
use crate::Services; ๐Ÿ”’
use crate::service::Service; ๐Ÿ”’

Structsยง

Manager ๐Ÿ”’

Constantsยง

RESTART_DELAY_MS ๐Ÿ”’

Functionsยง

worker ๐Ÿ”’
Base frame for service worker. This runs in a tokio::task. All errors and panics from the worker are caught and returned cleanly. The JoinHandle should never error with a panic, and if so it should propagate, but it may error with an Abort which the manager should handle along with results to determine if the worker should be restarted.

Type Aliasesยง

WorkerResult ๐Ÿ”’
Workers ๐Ÿ”’
WorkersLocked ๐Ÿ”’