Module 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§

AlbHealthCheckFuture
Future for AlbHealthCheckService.
AlbHealthCheckLayer
A [tower::Layer] used to apply AlbHealthCheckService.
AlbHealthCheckService
A middleware [Service] responsible for handling health check requests.