Table of Contents

Interface IHealthBasedLeaderElection

Namespace
Excalibur.Dispatch.LeaderElection
Assembly
Excalibur.Dispatch.LeaderElection.Abstractions.dll

Provides leader election capabilities with health checks.

public interface IHealthBasedLeaderElection : ILeaderElection, IAsyncDisposable
Inherited Members
Extension Methods

Methods

GetCandidateHealthAsync(CancellationToken)

Gets the health status of all candidates.

Task<IEnumerable<CandidateHealth>> GetCandidateHealthAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IEnumerable<CandidateHealth>>

Health status of all candidates.

UpdateHealthAsync(bool, IDictionary<string, string>?, CancellationToken)

Updates the health status of this candidate.

Task UpdateHealthAsync(bool isHealthy, IDictionary<string, string>? metadata, CancellationToken cancellationToken)

Parameters

isHealthy bool

Whether the candidate is healthy.

metadata IDictionary<string, string>

Optional health metadata.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A task that represents the asynchronous update operation.