shubhamranjan /dotnet-etcd

A C# .NET (dotnet) GRPC client for etcd v3 +

★ 297⑂ 62👁 14⑃ 278● 70▤ 36
C#MITCreated 2018-06-02
下载:10.0.010.0.0 ↓10.0.02026-11-08
+0
日增长
297
stars
62
forks
14
watchers
278
prs
70
issues
36
releases

README

dotnet-etcd

!etcd logo

A C .NET (dotnet) GRPC client for etcd v3+

!Build Status
!Nuget Version Info
!Nuget Download Info


 Table of Contents

- Supported .NET Versions
- Supported etcd Versions
- Installing Package
- Documentation
- Quick Start
- Features
- Contributing
- Testing and Code Coverage

 Supported .NET Versions
- .NET 10
- .NET 9
- .NET 8

 Compatibility Note

For older .NET versions:

- For .NET 6/7 support, use version 7.2.0
- For .NET versions  The NuGet Team does not provide support for this client. Please contact its maintainers for support.

 Documentation

For comprehensive documentation of all operations and method overloads, please see
the documentation pages.

The documentation is organized into the following sections:

 Getting Started

- Client Initialization - How to initialize and configure the client
- Dependency Injection - Using the client with DI
- Authentication - Authentication with etcd
- SSL/TLS Support - Connecting securely with SSL/TLS

 Core Operations

- Key-Value Operations - Working with keys and values
- Watch Operations - Watching for changes to keys
- Lease Operations - Working with leases
- Lock Operations - Distributed locking
- Election Operations - Leader election

 Advanced Operations

- Cluster Operations - Managing the etcd cluster
- Maintenance Operations - Maintenance tasks
- Transactions - Atomic operations

The documentation includes detailed API references with all method overloads, parameters, and return types, as well as
examples for common use cases.

 Quick Start

Add using statement at the top of your class file:

csharp
using dotnet_etcd;


 Client Initialization

csharp
// Basic initialization with a single endpoint
EtcdClient client = new EtcdClient("localhost:2379");

// Multiple endpoints
EtcdClient client = new EtcdClient("https://localhost:23790,https://localhost:23791,https://localhost:23792");

// Insecure connection (HTTP)
EtcdClient client = new EtcdClient("http://localhost:23790", configureChannelOptions: (options =
{
    options.Credentials = ChannelCredentials.Insecure;
}));


For more advanced initialization options, see
the Client Initialization documentation.

 Authentication

csharp
// Automatic authentication with constructor
var client = new EtcdClient("localhost:2379", "username", "password");

// All requests automatically authenticated
client.Put("foo/bar", "barfoo");
client.Get("foo/bar");

// Or set credentials after creation
var client = new EtcdClient("localhost:2379");
client.SetCredentials("username", "password");


For more authentication options, see the Authentication documentation.

 Features

 Robust Watch Reconnection
The client automatically recovers watches after network interruptions or server restarts. See Automatic Reconnection for details.

 SSL/TLS Support
Full support for secure connections, including self-signed certificates. See SSL/TLS Configuration for details on configuring SslClientAuthenticationOptions.

 Dependency Injection Support

Discussions

Latest release

10.0.0 10.0.0 2026-11-08
What's Changed
 ⚠️ Breaking Changes
 feat: make IEtcdClient extend IDisposable by @shubhamranjan in https://github.com/shubhamranjan/dotnet-etcd/pull/348
 🚀 Features
 feat: track etcd 3.7.3 API, expose RangeStream, AuthStatus, Downgrade, LeaseLeases, MemberPromote by @shubhamranjan in https://github.com/shubhamranjan/dotnet-etcd/pull/347
 🐛 Bug Fixes
 fix(watch): wait for etcd to acknowledge a watch before returning by @shubhamranjan in https://github.com/shubhamranjan/dotnet-etcd/pull/313
 fix(lock,election): add Lock/Campaign overloads that take an explicit lease by @suleymanbyzt in https://

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON