Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

DistributedApplicationBuilder.AddHealthCheck

Method
📦 Aspire.Hosting v17.0.0
type DistributedApplicationBuilder interface {
// ... omitted for brevity
AddHealthCheck(
name string,
check func(...any) *HealthCheckResult,
) error
}

Signature

methodAddHealthCheck
Adds a custom health check callback to the distributed-application builder.
AddHealthCheck(
name string,
check func(...any) *HealthCheckResult,
) error
namestringThe health check registration name.
checkfunc(...any) *HealthCheckResultcallbackThe callback that evaluates the health check.
error

Returns error.

Defined on

This method is defined on the following type: