KV and transactions
Key, prefix and range queries, atomic CAS, nested transactions; compact reclaims history.
PHP / etcd v3
Eight API domains, HTTP and gRPC transport, and six frameworks out of the box.
EtcdClient exposes accessors for eight subsystems: KV, Watch, Lease, Auth, Cluster, Maintenance, Election and Lock.
The HTTP path picks curl, PHP streams or PSR-18; Laravel, Hyperf, ThinkPHP, Webman, Yii2 and Yii3 work out of the box.
A blue elephant wearing a three-node Raft cluster, with k/v and rev tags on its trunk: the PHP etcd v3 client mascot.
Reconnect when dropped, clean up when expired.Every subsystem does one thing, with clear error boundaries.
Key, prefix and range queries, atomic CAS, nested transactions; compact reclaims history.
Watch a key or prefix, auto-resubscribe from lastRevision + 1, and cancel through WatchHandle.
grant, keepAlive, timeToLive and revoke, with expired keys cleaned up automatically.
Manage users, roles and permissions; credentials fetch tokens and 401 responses re-authenticate.
Add or remove members, promote learners, read status, defrag, and stream sha256-checked snapshots.
Run elections and watch the leader; Lock uses leases and releases after SIGKILL.
From transport fallbacks to framework adapters, every step is a real commit.
Add two Yii adapters, completing six frameworks: Laravel, Hyperf, ThinkPHP, Webman, Yii2 and Yii3.
Add Election, Lock, snapshotTo and watch cancellation; land unary gRPC RPCs.
Fix broken Watch, 400s on no-argument methods and keepAlive always throwing; rebuild the test suite.
Add a native PHP stream fallback to the HTTP transport, so ext-curl and PSR-18 are optional.
Click an image to enlarge.
Install, then run a minimal example.
composer require erikwang2013/etcduse Erikwang2013\Etcd\EtcdClient;
$etcd = new EtcdClient(['endpoints' => ['127.0.0.1:2379']]);
$etcd->kv()->put('/app/config', '{"debug":true}');
$result = $etcd->kv()->get('/app/config');
print_r($result['kvs'][0]);Hover and the mood changes.