HealthCheckPlus 1.0.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
Suggested Alternatives
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package HealthCheckPlus --version 1.0.0
NuGet\Install-Package HealthCheckPlus -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HealthCheckPlus" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HealthCheckPlus --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HealthCheckPlus, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HealthCheckPlus as a Cake Addin #addin nuget:?package=HealthCheckPlus&version=1.0.0 // Install HealthCheckPlus as a Cake Tool #tool nuget:?package=HealthCheckPlus&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Welcome to HealthCheckPlus
HealthCheck with IHealthCheckPublisher and individual check interval and Unhealth interval policy. The healthcheck endpoint�s, when called, does not perform any action and returns the healthcheckPlus status, protecting the execution according to the specified interval configuration and the unheath policy.
HealthCheckPlus was developed in c# with the **netstandard2.1, .NET 6 AND .NET7 ** target frameworks.
Official pages :
Visit the HealthCheckPlus official page for complete documentation
HealthCheckPlus - Sample Usage
//Create enum with all HealthCheck
public enum MyEnum
{
HcTeste1,
HcTeste2,
Redis
}
//At Statup / Program
builder.Services
.AddHealthChecks<MyEnum>("AppHealthCheck", HealthStatus.Degraded)
.AddRedis("teste1", "Myredis") //Register Xabaril Redis HealthCheck
.AddCheckPlus<MyEnum, HcTeste1>(MyEnum.HcTest1)
.AddCheckPlus<MyEnum, HcTeste2>(MyEnum.HcTest2, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(20), failureStatus: HealthStatus.Degraded)
.AddCheckRegistered(MyEnum.Redis, "MyRedis", TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(30))
.AddUnhealthyPolicy(MyEnum.Redis, TimeSpan.FromSeconds(10));
//At Statup / Program
app.UseHealthChecksPlus("/health/ready", HttpStatusCode.OK)
.UseHealthChecksPlus("/health/Live", HttpStatusCode.OK)
.UseHealthChecksPlusStatus("/health/Status", HttpStatusCode.OK);
//Create HealthCheck class inheriting from BaseHealthCheckPlus(IHealthCheck)
public class HTest1 : BaseHealthCheckPlus
{
public hcteste1(IServiceProvider serviceProvider) : base(serviceProvider)
{
}
public override async Task<HealthCheckResult> DoHealthCheck(HealthCheckContext context, CancellationToken cancellationToken)
{
return await Task.FromResult(HealthCheckResult.Healthy($"teste"));
}
}
//Create HealthCheck class inheriting from BaseHealthCheckPlus(IHealthCheck)
public class HTest2 : BaseHealthCheckPlus
{
public hcteste2(IServiceProvider serviceProvider) : base(serviceProvider)
{
}
public override async Task<HealthCheckResult> DoHealthCheck(HealthCheckContext context, CancellationToken cancellationToken)
{
return await Task.FromResult(HealthCheckResult.Healthy($"teste"));
}
}
//Consuming Status from HealthCheckPlus
public class MyBussines
{
public MyBussines(IStateHealthChecksPlus healthCheckApp)
{
if (healthCheckApp.StatusApp.Status == HealthStatus.Degraded)
{
//do something
}
if (healthCheckApp.StatusDep(MyEnum.HcTeste2).Status == HealthStatus.Unhealthy)
{
//do something. This dependency 'HcTeste2' is not available
}
}
}
License
This project is licensed under the MIT License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- Microsoft.AspNetCore.Diagnostics.HealthChecks (>= 2.2.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 3.1.32)
- System.Text.Json (>= 4.6.0)
-
net6.0
- Microsoft.AspNetCore.Diagnostics.HealthChecks (>= 2.2.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 6.0.13)
- System.Text.Json (>= 6.0.7)
-
net7.0
- Microsoft.AspNetCore.Diagnostics.HealthChecks (>= 2.2.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 7.0.2)
- System.Text.Json (>= 7.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.0.1 | 336 | 2/26/2024 | |
2.0.0 | 131 | 2/24/2024 | |
2.0.0-beta2 | 132 | 2/20/2024 | |
2.0.0-beta1 | 105 | 2/19/2024 | |
2.0.0-beta | 94 | 2/19/2024 | |
1.0.5 | 155 | 1/29/2024 | |
1.0.4 | 272 | 11/14/2023 | |
1.0.3 | 280 | 9/28/2023 | |
1.0.2 | 1,532 | 2/8/2023 | |
1.0.1 | 290 | 2/6/2023 | |
1.0.0 | 281 | 2/6/2023 |