Class HealthCheckBuilderExtensions
Adds methods such as AddOutboundEndpointsCheck
and AddOutboundQueueCheck
to the
IHealthChecksBuilder.
Inherited Members
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Silverback.Integration.HealthChecks.dll
Syntax
public static class HealthCheckBuilderExtensions
Methods
| Improve this doc View sourceAddConsumersCheck(IHealthChecksBuilder, ConsumerStatus, TimeSpan?, Func<IConsumerEndpoint, bool>?, string, HealthStatus?, IEnumerable<string>?)
Adds a health check that verifies that all consumers are connected.
Declaration
public static IHealthChecksBuilder AddConsumersCheck(this IHealthChecksBuilder builder, ConsumerStatus minHealthyStatus = ConsumerStatus.Ready, TimeSpan? gracePeriod = null, Func<IConsumerEndpoint, bool>? endpointsFilter = null, string name = "Consumers", HealthStatus? failureStatus = null, IEnumerable<string>? tags = null)
Parameters
Type | Name | Description |
---|---|---|
IHealthChecksBuilder | builder | The IHealthChecksBuilder. |
ConsumerStatus | minHealthyStatus | The minimum ConsumerStatus a consumer must have to be considered healthy. |
TimeSpan? | gracePeriod | The grace period to observe after each status change before a consumer is considered unhealthy. |
Func<IConsumerEndpoint, bool> | endpointsFilter | An optional filter to be applied to the endpoints to be tested. |
string | name | The health check name. The default is "Consumers". |
HealthStatus? | failureStatus | The HealthStatus that should be reported when the health check reports a failure. The default is Unhealthy. |
IEnumerable<string> | tags | An optional list of tags that can be used for filtering health checks. |
Returns
Type | Description |
---|---|
IHealthChecksBuilder | The IHealthChecksBuilder so that additional calls can be chained. |
AddOutboundEndpointsCheck(IHealthChecksBuilder, string, HealthStatus?, IEnumerable<string>?)
Adds a health check that sends a ping message to all the outbound endpoints.
Declaration
public static IHealthChecksBuilder AddOutboundEndpointsCheck(this IHealthChecksBuilder builder, string name = "OutboundEndpoints", HealthStatus? failureStatus = null, IEnumerable<string>? tags = null)
Parameters
Type | Name | Description |
---|---|---|
IHealthChecksBuilder | builder | The IHealthChecksBuilder. |
string | name | The health check name. The default is "OutboundEndpoints". |
HealthStatus? | failureStatus | The HealthStatus that should be reported when the health check reports a failure. The default is Unhealthy. |
IEnumerable<string> | tags | An optional list of tags that can be used for filtering health checks. |
Returns
Type | Description |
---|---|
IHealthChecksBuilder | The IHealthChecksBuilder so that additional calls can be chained. |
AddOutboxCheck(IHealthChecksBuilder, string, HealthStatus?, IEnumerable<string>?)
Adds a health check that monitors the outbox, verifying that the messages are being processed.
Declaration
public static IHealthChecksBuilder AddOutboxCheck(this IHealthChecksBuilder builder, string name = "OutboundQueue", HealthStatus? failureStatus = null, IEnumerable<string>? tags = null)
Parameters
Type | Name | Description |
---|---|---|
IHealthChecksBuilder | builder | The IHealthChecksBuilder. |
string | name | The health check name. The default is "OutboundQueue". |
HealthStatus? | failureStatus | The HealthStatus that should be reported when the health check reports a failure. The default is Unhealthy. |
IEnumerable<string> | tags | An optional list of tags that can be used for filtering health checks. |
Returns
Type | Description |
---|---|
IHealthChecksBuilder | The IHealthChecksBuilder so that additional calls can be chained. |