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
cancellationTokenCancellationTokenCancellation 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
isHealthyboolWhether the candidate is healthy.
metadataIDictionary<string, string>Optional health metadata.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task
A task that represents the asynchronous update operation.