Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

NHealthCheck

CI/CDCoverage Status

.NET implementation of the APIs available at Healthchecks.io

Installation

CLI

dotnet add package NHealthCheck

NuGet

Search for NHealthCheck in your package manager of choice.

Usage

This package is built with dependency injection in mind. It's recommended to register it first (Native):

builder.Services.AddHttpClient<IHealthCheckService,HealthCheckService>();

or (Autofac):

varservices=newServiceCollection();services.AddHttpClient<IHealthCheckService,HealthCheckService>();builder.Populate(services);

The simplest use is to call the success method when your job finishes:

publicclassMyJob{privateIHeathCheckServiceHealthCheckService{get;}publicMyJob(IHealthCheckServicehealthCheckService){HealthCheckService=healthCheckService;}publicTaskDoWork(){
...
await HealthCheckService.SuccessAsync(newGuid(config.HealthCheckGuid));}}

About

Small helper package for Healthcheck.io

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages