pub mod builder;
pub mod health;
#[cfg(all(feature = "jobs", feature = "macros"))]
pub mod jobs_runtime;
pub mod lifecycle;
pub mod pipeline;
pub mod resources;
#[cfg(feature = "macros")]
pub mod serve_ipc;
#[cfg(feature = "uag")]
pub mod uag_endpoint;
pub use builder::{Application, ApplicationBuilder};
pub use health::{Health, HealthReport};
pub use lifecycle::{Lifecycle, LifecycleState};
pub use resources::Resources;
#[cfg(feature = "uag")]
pub use uag_endpoint::UagEndpoint;
#[derive(Debug, thiserror::Error)]
pub enum EngineError {
#[error("failed to bind listener on {address}: {source}")]
BindListener {
address: String,
#[source]
source: std::io::Error,
},
#[error("invalid bind port: {0}")]
InvalidPort(u16),
#[error("failed to serve: {source}")]
Serve {
#[source]
source: std::io::Error,
},
#[error("startup failed in {subsystem} during {stage}: {source}")]
Startup {
subsystem: &'static str,
stage: &'static str,
#[source]
source: crate::Error,
},
#[error("shutdown failed in {subsystem}: {source}")]
Shutdown {
subsystem: &'static str,
#[source]
source: crate::Error,
},
}
pub type EngineResult<T> = std::result::Result<T, EngineError>;