Expand description
Lifecycle management for mode-based dynamic node control
This module provides the lifecycle manager that orchestrates node start/stop based on operational mode changes.
§Architecture
CLI → Redis (mode/request) → LifecycleManager → Supervisor → NodesThe lifecycle manager:
- Subscribes to mode change requests
- Calculates which nodes need to start/stop
- Uses Supervisor to execute changes
- Publishes mode changed events
§Example
ⓘ
use mecha10_runtime::lifecycle::LifecycleManager;
let lifecycle = LifecycleManager::new(
context,
supervisor,
mode_config,
"startup".to_string(),
);
// Run in background
tokio::spawn(async move {
lifecycle.run().await
});Structs§
- Lifecycle
Manager - Lifecycle manager for mode-based node orchestration
- Mode
Config - Configuration for a single mode
- Mode
Diff - Difference between current and target mode
- Mode
Transition Result - Result of a mode transition
Traits§
- Supervisor
Trait - Trait for supervisor operations