Anarchy.Toolkit.Core.Health
1.0.6
See the version list below for details.
dotnet add package Anarchy.Toolkit.Core.Health --version 1.0.6
NuGet\Install-Package Anarchy.Toolkit.Core.Health -Version 1.0.6
<PackageReference Include="Anarchy.Toolkit.Core.Health" Version="1.0.6" />
<PackageVersion Include="Anarchy.Toolkit.Core.Health" Version="1.0.6" />
<PackageReference Include="Anarchy.Toolkit.Core.Health" />
paket add Anarchy.Toolkit.Core.Health --version 1.0.6
#r "nuget: Anarchy.Toolkit.Core.Health, 1.0.6"
#:package Anarchy.Toolkit.Core.Health@1.0.6
#addin nuget:?package=Anarchy.Toolkit.Core.Health&version=1.0.6
#tool nuget:?package=Anarchy.Toolkit.Core.Health&version=1.0.6
Anarchy.Toolkit.Core.Health
Shared health-check contracts and report models for service endpoints.
dotnet add package Anarchy.Toolkit.Core.Health
- Implement
IServiceHealthReportor derive fromServiceHealthReportBasefor timed, exception-safe checks. - Use
HealthCheckReport.RunAsync(reports)to run reports in parallel and aggregate their results. HealthCheckEntity,ExceptionReport,IBuildMetadataandApplicationRunbookUriAttributeprovide shared health and status metadata.
When to use it
Use this package to describe dependency checks independently of the HTTP host. It is suitable for checks such as a database ping or a downstream service probe; the web and worker packages can expose the results using the same model.
How to use it
Implement a report for each dependency. Return normally for a passing check and throw on failure; the base class records the duration and converts exceptions into failed results. Caller-requested cancellation is propagated.
using Anarchy.Toolkit.Core.Health.Service.Health;
public sealed class ExampleHealthReport : ServiceHealthReportBase
{
protected override string Name => "example_dependency";
protected override async Task CheckAsync(CancellationToken cancellationToken)
{
// Replace with a real, bounded dependency check.
await Task.Delay(1, cancellationToken);
}
}
Supply reports as an IReadOnlyCollection<IServiceHealthReport> to the toolkit's web or worker health endpoints, or call HealthCheckReport.RunAsync(reports) to aggregate them directly. A successful placeholder check does not establish that a real dependency is healthy.
The Web and Hosting.Workers packages expose health endpoints. See the toolkit overview.
Releases
1.0.6
- docs: expand XML docblocks across all projects for the DocFX API reference
1.0.5
- refactor(src): clean up code style across library packages
1.0.3
- build: migrate local automation to build tooling
1.0.2
- docs: expand package guides and release histories
1.0.1
- Added a package-specific NuGet README.
1.0.0
- Introduced health check entities and reports, build metadata and health reporting abstractions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Anarchy.Toolkit.Core (>= 1.0.6)
- Humanizer (>= 3.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Anarchy.Toolkit.Core.Health:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Infrastructure.Persistence.Db
Provider-agnostic relational database implementation of the persistence abstraction: connection pool, Unit of Work, resilience policy, dialect contract, repository bases, service health reports, and the transactional outbox / event store (repository contracts, records, type-id cache, and repository bases; providers supply the dialect and the embedded SQL). |
|
|
Anarchy.Toolkit.Web
Shared REST API pipeline: startup bases, entry points, middleware, auth, swagger, and presentation helpers. |
|
|
Anarchy.Toolkit.Hosting.Workers
Worker pipeline: monitored/resilient background workers, heartbeat, and a self-hosted health API (service health reports, build metadata) for workers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.