Show / Hide Table of Contents

    Class ConsumersHealthCheck

    Verifies whether all consumers are connected.

    Inheritance
    object
    ConsumersHealthCheck
    Implements
    IHealthCheck
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.HealthChecks
    Assembly: Silverback.Integration.HealthChecks.dll
    Syntax
    public class ConsumersHealthCheck : IHealthCheck

    Constructors

    | Improve this doc View source

    ConsumersHealthCheck(IConsumersHealthCheckService, ConsumerStatus, TimeSpan, Func<IConsumerEndpoint, bool>?)

    Initializes a new instance of the ConsumersHealthCheck class.

    Declaration
    public ConsumersHealthCheck(IConsumersHealthCheckService service, ConsumerStatus minHealthyStatus, TimeSpan gracePeriod, Func<IConsumerEndpoint, bool>? endpointsFilter)
    Parameters
    Type Name Description
    IConsumersHealthCheckService service

    The IConsumersHealthCheckService implementation to be used to check the consumers.

    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.

    Methods

    | Improve this doc View source

    CheckHealthAsync(HealthCheckContext, CancellationToken)

    Runs the health check, returning the status of the component being checked.

    Declaration
    public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    HealthCheckContext context

    A context object associated with the current execution.

    CancellationToken cancellationToken

    A CancellationToken that can be used to cancel the health check.

    Returns
    Type Description
    Task<HealthCheckResult>

    A Task<TResult> that completes when the health check has finished, yielding the status of the component being checked.

    Implements

    IHealthCheck
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini