Skip to main content

appcore_supervisor/
lib.rs

1// =============================================================================
2//        #######
3//     ###       ###     F: lib.rs
4//    ##   ## ##   ##    P: AppCore-Runtime
5//         ## ##
6//                       C: 2026/07/24 11:51:10 by dnettoRaw
7//    ##   ## ##   ##    U: 2026/07/24 13:18:47 by dnettoRaw
8//      ###########      S: 1.0.1-rc.8
9// =============================================================================
10
11//! Dependency-aware supervision for in-process managed services.
12//!
13//! This crate supervises managed services, workers, queues, and threads. It
14//! deliberately does not supervise the operating-system process that hosts the
15//! Runtime.
16
17#![deny(missing_docs)]
18#![forbid(unsafe_code)]
19
20mod adapters;
21mod constants;
22mod error;
23mod events;
24mod graph;
25mod health;
26mod policy;
27mod restart_executor;
28mod service;
29mod snapshot;
30mod supervisor;
31mod watchdog;
32
33pub use adapters::{CallbackManagedService, ManagedThreadService, PassiveManagedService};
34pub use constants::DEFAULT_EVENT_CAPACITY;
35pub use error::{SupervisorError, SupervisorResult};
36pub use events::{SupervisorEvent, SupervisorEventKind};
37pub use health::{
38    DependencyRequirement, ServiceActivationState, ServiceHealth, ServiceRuntimeState,
39};
40pub use policy::{RestartMode, RestartPolicy};
41pub use restart_executor::RestartState;
42pub use service::{ManagedResource, ManagedService, ServiceDependency, ServiceDescriptor};
43pub use snapshot::{
44    RestartExecutorSnapshot, ServiceSnapshot, SupervisorDiagnosis, WatchdogSnapshot,
45};
46pub use supervisor::Supervisor;
47pub use watchdog::{
48    SupervisorWatchdog, WatchdogConfig, WatchdogState, DEFAULT_WATCHDOG_CHECK_INTERVAL_MS,
49    DEFAULT_WATCHDOG_STALL_TIMEOUT_MS,
50};