VOOZH about

URL: https://www.nuget.org/packages/Excalibur.LeaderElection.Consul/

⇱ NuGet Gallery | Excalibur.LeaderElection.Consul 3.0.0-alpha.208




Excalibur.LeaderElection.Consul 3.0.0-alpha.208

This is a prerelease version of Excalibur.LeaderElection.Consul.
dotnet add package Excalibur.LeaderElection.Consul --version 3.0.0-alpha.208
 
 
NuGet\Install-Package Excalibur.LeaderElection.Consul -Version 3.0.0-alpha.208
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Excalibur.LeaderElection.Consul" Version="3.0.0-alpha.208" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Excalibur.LeaderElection.Consul" Version="3.0.0-alpha.208" />
 
Directory.Packages.props
<PackageReference Include="Excalibur.LeaderElection.Consul" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Excalibur.LeaderElection.Consul --version 3.0.0-alpha.208
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Excalibur.LeaderElection.Consul, 3.0.0-alpha.208"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Excalibur.LeaderElection.Consul@3.0.0-alpha.208
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Excalibur.LeaderElection.Consul&version=3.0.0-alpha.208&prerelease
 
Install as a Cake Addin
#tool nuget:?package=Excalibur.LeaderElection.Consul&version=3.0.0-alpha.208&prerelease
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Excalibur.LeaderElection.Consul

HashiCorp Consul implementation of distributed leader election using sessions and KV store.

Installation

dotnet add package Excalibur.LeaderElection.Consul

Features

  • Uses Consul sessions with KV store for distributed locking
  • Session TTL with automatic renewal
  • Lock delay for graceful failover
  • ACL token support for secure environments
  • Multi-datacenter support
  • Health check integration
  • AOT-compatible with full Native AOT support

Usage

// Register Consul leader election
services.AddConsulLeaderElection(options =>
{
 options.ConsulAddress = "http://localhost:8500";
 options.KeyPrefix = "myapp/leader-election";
 options.SessionTTL = TimeSpan.FromSeconds(30);
 options.LockDelay = TimeSpan.FromSeconds(15);
});

// Or for a specific resource
services.AddConsulLeaderElectionForResource("order-processor");

Configuration Options

Option Default Description
ConsulAddress http://localhost:8500 Consul server address
Datacenter null Target datacenter
Token null ACL token for authentication
KeyPrefix excalibur/leader-election KV store key prefix
SessionTTL 30 seconds Session time-to-live
LockDelay 15 seconds Delay before lock reacquisition
HealthCheckId null Health check to bind session

How It Works

Consul provides distributed locking via sessions:

  1. Create session with TTL and optional health check binding
  2. Acquire lock via PUT ?acquire=<session> on KV key
  3. Only one session can hold the lock at a time
  4. Session invalidation releases the lock after lock delay

Related Packages

  • Excalibur.LeaderElection - Core abstractions and InMemory implementation

License

This project is multi-licensed under:

See for details.

Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0-alpha.208 44 6/11/2026
3.0.0-alpha.207 44 6/11/2026
3.0.0-alpha.205 51 6/10/2026
3.0.0-alpha.204 50 6/8/2026
3.0.0-alpha.203 47 6/8/2026
3.0.0-alpha.202 46 6/8/2026
3.0.0-alpha.201 51 6/8/2026
3.0.0-alpha.199 51 6/8/2026
3.0.0-alpha.198 56 5/28/2026
3.0.0-alpha.197 62 5/28/2026
3.0.0-alpha.194 60 5/20/2026
3.0.0-alpha.193 56 5/13/2026
3.0.0-alpha.192 54 5/13/2026
3.0.0-alpha.191 51 5/13/2026
3.0.0-alpha.189 53 5/12/2026
3.0.0-alpha.187 57 5/8/2026
3.0.0-alpha.185 57 5/7/2026
3.0.0-alpha.183 50 5/7/2026
3.0.0-alpha.182 51 5/6/2026
3.0.0-alpha.181 51 5/6/2026
Loading failed