mecha10-runtime 0.9.0

Runtime supervisor for Mecha10 nodes - launching, monitoring, and lifecycle management
Documentation
//! Mecha10 Runtime - Node supervision and lifecycle management
//!
//! This crate provides a runtime supervisor for Mecha10 nodes, handling:
//! - Node launching and supervision
//! - Health checking and monitoring
//! - Graceful shutdown
//! - Restart policies
//! - Logging configuration
//!
//! # Example
//!
//! ```rust,no_run
//! use mecha10_runtime::prelude::*;
//! use async_trait::async_trait;
//!
//! struct MyNode;
//!
//! #[async_trait]
//! impl NodeRunner for MyNode {
//!     fn name(&self) -> &str {
//!         "my_node"
//!     }
//!
//!     async fn run(&mut self) -> anyhow::Result<()> {
//!         // Node logic here
//!         Ok(())
//!     }
//! }
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//!     let mut runtime = Runtime::builder().build();
//!     runtime.run_node("my_node", Box::new(MyNode)).await?;
//!     Ok(())
//! }
//! ```

pub mod config;
pub mod health;
pub mod launcher;
pub mod lifecycle;
pub mod logging;
pub mod node;
pub mod process;
pub mod runtime;
pub mod shutdown;
pub mod supervisor;

pub use config::{LogFormat, RestartPolicy, RuntimeConfig};
pub use health::{HealthChecker, HealthStatus};
pub use lifecycle::{LifecycleManager, ModeConfig, ModeTransitionResult, SupervisorTrait};
pub use node::NodeRunner;
pub use process::{ProcessInfo, ProcessManager, ProcessStatus};
pub use runtime::{Runtime, RuntimeBuilder};
pub use shutdown::ShutdownHandle;
pub use supervisor::{NodeHandle, NodeStatus, Supervisor};

pub mod prelude {
    pub use crate::config::{LogFormat, RestartPolicy, RuntimeConfig};
    pub use crate::health::{HealthChecker, HealthStatus};
    pub use crate::lifecycle::{LifecycleManager, ModeConfig, ModeTransitionResult, SupervisorTrait};
    pub use crate::node::NodeRunner;
    pub use crate::process::{ProcessInfo, ProcessManager, ProcessStatus};
    pub use crate::runtime::{Runtime, RuntimeBuilder};
    pub use crate::shutdown::ShutdownHandle;
    pub use crate::supervisor::{NodeHandle, NodeStatus, Supervisor};
    pub use async_trait::async_trait;
}