Class HealthHandlers

Class Documentation

class HealthHandlers

Health and system info endpoint handlers.

Handles:

Migrated to the typed RouteRegistry API as part of PR-403 commit 16. Handler signatures follow the project-wide convention established by this commit:

http::Result<dto::TResponse> get_X(const http::TypedRequest & req);

The framework owns the cpp-httplib response object - handlers never touch it directly. Errors are returned as tl::unexpected(ErrorInfo) and the framework renders them via the SOVD GenericError schema.

Public Functions

inline explicit HealthHandlers(HandlerContext &ctx, const openapi::RouteRegistry *route_registry = nullptr)
http::Result<dto::Health> get_health(const http::TypedRequest &req)

GET /health - Health check endpoint.

http::Result<dto::RootOverview> get_root(const http::TypedRequest &req)

GET / - Root endpoint with server capabilities.

http::Result<dto::VersionInfo> get_version_info(const http::TypedRequest &req)

GET /version-info - Version information.