adaptive_pipeline/infrastructure/
runtime.rs

1// /////////////////////////////////////////////////////////////////////////////
2// Adaptive Pipeline
3// Copyright (c) 2025 Michael Gardner, A Bit of Help, Inc.
4// SPDX-License-Identifier: BSD-3-Clause
5// See LICENSE file in the project root.
6// /////////////////////////////////////////////////////////////////////////////
7
8//! # Runtime Infrastructure
9//!
10//! This module provides runtime infrastructure for resource management,
11//! concurrency control, and system-level coordination.
12//!
13//! ## Modules
14//!
15//! - **resource_manager**: Global resource governance (CPU, I/O, memory)
16//! - **supervisor**: Supervised task spawning with error handling and logging
17//! - **stage_executor**: Pipeline stage execution orchestration
18//!
19//! ## Educational Purpose
20//!
21//! This module demonstrates enterprise patterns for:
22//! - Centralized resource control
23//! - System-wide coordination
24//! - Prevention of resource oversubscription
25//! - Supervised concurrent task execution
26
27pub mod resource_manager;
28pub mod stage_executor;
29pub mod supervisor;
30
31// Re-export commonly used types
32pub use resource_manager::{
33    init_resource_manager, resource_manager, GlobalResourceManager, ResourceConfig, StorageType, RESOURCE_MANAGER,
34};
35
36pub use supervisor::{join_supervised, spawn_supervised, AppResult};