sunbeam-g2v 0.4.0

Sunbeam Service Framework - A ConnectRPC-based framework for building microservices
//! Middleware for Sunbeam services.

#[cfg(feature = "auth")]
pub mod auth;
#[cfg(feature = "cache")]
/// Response cache.
pub mod cache;
#[cfg(feature = "metrics")]
/// Instrumentation.
pub mod instrumentation;
#[cfg(feature = "logging")]
/// Logging.
pub mod logging;
#[cfg(feature = "axum")]
/// Panic recovery.
pub mod panic_recovery;
/// Request id.
pub mod request_id;
#[cfg(feature = "tracing")]
/// Tracing.
pub mod tracing;

#[cfg(feature = "metrics")]
/// Re-export commonly used middleware
pub use instrumentation::InstrumentationLayer;

/// A boxed error type for middleware.
pub type MiddlewareError = Box<dyn std::error::Error + Send + Sync>;

#[cfg(test)]
mod tests {
    #[test]
    fn test_middleware_placeholder() {
        // Module exists and compiles when no feature-specific middleware is enabled.
    }
}