Module aws_smithy_http_server::layer::alb_health_check
source · Expand description
Middleware for handling ALB health checks.
§Example
use aws_smithy_http_server::layer::alb_health_check::AlbHealthCheckLayer;
use hyper::StatusCode;
use tower::Layer;
// Handle all `/ping` health check requests by returning a `200 OK`.
let ping_layer = AlbHealthCheckLayer::from_handler("/ping", |_req| async {
StatusCode::OK
});
let app = tower::service_fn(handle);
let app = ping_layer.layer(app);
Structs§
- Future for
AlbHealthCheckService
. - A [
tower::Layer
] used to applyAlbHealthCheckService
. - A middleware [
Service
] responsible for handling health check requests.