Path: redb-route/redb.Route/Extensions/HealthCheckExtensions.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Extensions/HealthCheckExtensions.cs
----
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
namespace redb.Route.Extensions;
///
/// Extension methods for adding route engine health checks.
///
public static class HealthCheckExtensions
{
///
/// Adds a health check for the redb.Route engine.
///
/// Health checks builder.
/// Health check name (default: "redb-route").
///
/// Status to report on failure (default: ).
///
/// Optional tags for filtering.
/// The builder for chaining.
public static IHealthChecksBuilder AddRedbRouteCheck(
this IHealthChecksBuilder builder,
string name = "redb-route",
HealthStatus? failureStatus = HealthStatus.Degraded,
IEnumerable? tags = null)
{
return builder.AddCheck(name, failureStatus, tags ?? []);
}
}