This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
DevOpsOpenHack/apis/poi/web/Utility/HealthCheck.cs

20 lines
651 B
C#
Raw Normal View History

2022-11-03 20:41:13 +00:00
using Microsoft.Extensions.Diagnostics.HealthChecks;
using System.Threading;
using System.Threading.Tasks;
namespace poi.Utility
{
public class HealthCheck : IHealthCheck
{
public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
{
var healthCheckResultHealthy = true; //TODO: implement a proper health check
if (healthCheckResultHealthy)
return Task.FromResult(HealthCheckResult.Healthy("POI is healthy."));
return Task.FromResult(HealthCheckResult.Unhealthy("POI is UNHEALTHY!!!"));
}
}
}