addHealthCheck

Method
📦 Aspire.Hosting v17.0.0
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addHealthCheck(
name: string,
check: callback): void;
}

Signature

methodaddHealthCheck
Adds a custom health check callback to the distributed-application builder.
addHealthCheck(name: string, check: () => Promise<HealthCheckResult>): void
namestringThe health check registration name.
check() => Promise<HealthCheckResult>The callback that evaluates the health check.

Applies to

This method applies to the following types: