@edgeros/etcd3 support JSER and Node.js, production-ready client for the Protocol Buffer-based etcd v3 API. It includes:
- load balancing
- fault handling and reconnections
- transactions
- software transactional memory
- high-level query builders
- lease management
- watchers
- user and role mocking management
- elections
and is type-safe for TypeScript consumers.
Install via:
npm install --save @edgeros/etcd3
[Node.js also need install grpc manually]
npm install --save grpc
Start building!
const { Etcd3 } = require('@edgeros/etcd3');
const client = new Etcd3();
(async () => {
await client.put('foo').value('bar');
const fooValue = await client.get('foo').string();
console.log('foo was:', fooValue);
const allFValues = await client.getAll().prefix('f').keys();
console.log('all our keys starting with "f":', allFValues);
await client.delete().all();
})();
Our TypeDoc docs are available here.
Our test cases are also readable.