ResourceWithEndpoints.WithHttpHealthCheck

Method
📦 Aspire.Hosting v17.0.0
func (ResourceWithEndpoints) WithHttpHealthCheck(options ...*WithHttpHealthCheckOptions) ResourceWithEndpoints

Signature

methodWithHttpHealthCheckbuilder
Adds a health check to the resource which is mapped to a specific endpoint.
WithHttpHealthCheck(options ...*WithHttpHealthCheckOptions) ResourceWithEndpoints
options...*WithHttpHealthCheckOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithHttpHealthCheckOptions argument.

Path*stringThe relative path to test.
StatusCode*float64The result code to interpret as healthy.
EndpointName*stringThe name of the endpoint to derive the base address from.
ResourceWithEndpoints

The resource builder.

Returns a handle; failures surface later via Err().

Defined on

A marker interface declares no methods of its own in Go. Its functions are declared on the concrete types they apply to.

Applies to

This function applies to the following types: