gateway_runtime/layers/mod.rs
1//! # Middleware Layers
2//!
3//! This module contains the `tower::Service` middleware layers used by the [Gateway](crate::Gateway)
4//! to compose the runtime behavior. Each layer is responsible for a specific aspect of request/response
5//! processing.
6//!
7//! ## Available Layers
8//!
9//! * **[error::ErrorLayer]**: Catches errors from inner services and converts them to HTTP responses
10//! using a configured [ErrorHandler](crate::gateway::ErrorHandler).
11//! * **[headers::HeaderLayer]**: Filters and transforms incoming and outgoing HTTP headers.
12//! * **[metadata::MetadataLayer]**: Extracts metadata from the request (e.g., via annotators) and
13//! injects it into the request extensions for downstream processing.
14//! * **[response::ResponseLayer]**: Applies modifications to the HTTP response before it is returned.
15
16pub mod error;
17pub mod headers;
18pub mod metadata;
19pub mod response;