etcd
Distributed Storebackend/etcd
etcd is a distributed, reliable key-value store for the most critical data of a distributed system. It's the backing store for Kubernetes and provides strong consistency guarantees.
📦 Installation
go get github.com/azrod/kivigo/backend/etcd
Dependencies
- etcd server (version 3.4+)
- Network connectivity to etcd cluster
✨ Features
✅Basic Operations
✅Batch Operations
✅Health Checks
✅Persistence
✅MVCC
✅Transactions
❌Watches
❌Leases
🚀 Usage
- Configuration
- Basic Usage
// etcd configuration example
opt := etcd.DefaultOptions()
opt.Endpoints = []string{"localhost:2379"}
kvStore, err := etcd.New(opt)
// Basic etcd usage
err = client.Set(ctx, "cluster/config", configData)
var config ConfigType
err = client.Get(ctx, "cluster/config", &config)
📝 Notes
- etcd provides linearizable reads and writes
- Uses Raft consensus for distributed coordination
- Optimized for metadata and configuration storage
- Default Kubernetes backing store