Class PipelineHealthCheck<T>
- Namespace
- Pipelinez.Core.Operational
- Assembly
- Pipelinez.dll
Adapts a Pipelinez pipeline into a standard ASP.NET Core health check.
public sealed class PipelineHealthCheck<T> : IHealthCheck where T : PipelineRecord
Type Parameters
TThe pipeline record type handled by the pipeline.
- Inheritance
-
PipelineHealthCheck<T>
- Implements
- Inherited Members
Constructors
PipelineHealthCheck(IPipeline<T>, bool)
Initializes a new pipeline health check.
public PipelineHealthCheck(IPipeline<T> pipeline, bool includeComponentDiagnostics = true)
Parameters
pipelineIPipeline<T>The pipeline to inspect.
includeComponentDiagnosticsboolA value indicating whether component status information should be included in the health-check payload.
Methods
CheckHealthAsync(HealthCheckContext, CancellationToken)
Runs the health check, returning the status of the component being checked.
public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Parameters
contextHealthCheckContextA context object associated with the current execution.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel the health check.
Returns
- Task<HealthCheckResult>
A Task<TResult> that completes when the health check has finished, yielding the status of the component being checked.