HealthCheckResult 結構

定義

表示健康狀態檢查的結果。Represents the result of a health check.

public value class HealthCheckResult
public struct HealthCheckResult
type HealthCheckResult = struct
Public Structure HealthCheckResult
繼承
HealthCheckResult

建構函式

HealthCheckResult(HealthStatus, String, Exception, IReadOnlyDictionary<String,Object>)

使用指定的 statusexceptiondescriptiondata 的值來建立新 HealthCheckResultCreates a new HealthCheckResult with the specified values for status, exception, description, and data.

屬性

Data

取得描述元件健康狀態的其他索引鍵/值組。Gets additional key-value pairs describing the health of the component.

Description

取得可供人員閱讀的已檢查元件狀態描述。Gets a human-readable description of the status of the component that was checked.

Exception

取得代表檢查狀態時擲回之例外狀況的 Exception (如有)。Gets an Exception representing the exception that was thrown when checking for status (if any).

Status

取得指出已檢查元件之狀態的值。Gets a value indicating the status of the component that was checked.

方法

Degraded(String, Exception, IReadOnlyDictionary<String,Object>)

建立代表降級元件的 HealthCheckResultCreates a HealthCheckResult representing a degraded component.

Healthy(String, IReadOnlyDictionary<String,Object>)

建立代表狀況良好元件的 HealthCheckResultCreates a HealthCheckResult representing a healthy component.

Unhealthy(String, Exception, IReadOnlyDictionary<String,Object>)

建立代表狀況不良元件的 HealthCheckResultCreates a HealthCheckResult representing an unhealthy component.

適用於