Table of Contents

Interface ITyphonHealthCheck

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Interface for Typhon health checks, independent of ASP.NET Core.

public interface ITyphonHealthCheck

Remarks

Consumers can provide a thin adapter to bridge this to IHealthCheck from Microsoft.Extensions.Diagnostics.HealthChecks if using ASP.NET Core.

// ASP.NET Core adapter example:
public class TyphonHealthCheckAdapter : IHealthCheck
{
    private readonly ITyphonHealthCheck _typhonCheck;

    public Task<HealthCheckResult> CheckHealthAsync(...)
    {
        var result = _typhonCheck.GetDetailedResult();
        return Task.FromResult(new HealthCheckResult(
            (HealthStatus)(int)result.Status,
            result.Description,
            data: result.Data));
    }
}

Methods

CheckHealth()

Perform a quick health check, returning only the status.

HealthStatus CheckHealth()

Returns

HealthStatus

Current health status.

Remarks

This is optimized for frequent polling (e.g., Kubernetes liveness probes). Uses FindMostUtilized() for O(n) complexity.

GetDetailedResult()

Perform a detailed health check with diagnostic information.

HealthCheckResult GetDetailedResult()

Returns

HealthCheckResult

Detailed health check result including metrics data.

Remarks

Provides additional context for debugging and dashboards:

  • The resource with highest utilization
  • All resources above degraded threshold
  • Contention hotspots