Skip to content
🔖 Node.js client for etcd3
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin feat(rpc): mark clients as failing when streams emit an error May 20, 2018
docs chore(docs): rebuild May 6, 2018
proto fix(codegen): call stack errors when regenerating proto fildes Nov 12, 2017
src chore(dep): update and modernize dependencies Jul 3, 2019
test chore(dep): update and modernize dependencies Jul 3, 2019
.editorconfig init Apr 10, 2017
.gitignore fix(stm): stm comparisons being invalid when using namespaces Jul 3, 2019
.npmignore Fix files being incorrectly npmignored Apr 13, 2017
.travis.yml
Dockerfile fix(client): allow mock.getConnection to return promises Feb 10, 2018
LICENSE Initial working version of password auth Jun 2, 2017
changelog.md docs(changelog): cut 0.2.13 release Jul 3, 2019
package-lock.json
package.json 0.2.13 Jul 3, 2019
readme.md docs(readme): add code of conduct link May 29, 2018
tsconfig.json fix(stm): address PR comments, add thorough tests and fix bugs Oct 16, 2017
tslint.json chore(dep): update and modernize dependencies Jul 3, 2019

readme.md

etcd3 Build Status

etcd3 aims to be (with its first stable release) a high-quality, production-ready client for the Protocol Buffer-based etcdv3 API. It includes load balancing, reconnections, transactions, software transactional memory, high-level query builders and lease management, watchers, mocking, and is type-safe for TypeScript consumers.

Quickstart

Install via:

npm install --save etcd3

Start CRUD-ing!

const { Etcd3 } = require('etcd3');
const client = new Etcd3();

client.put('foo').value('bar')
  .then(() => client.get('foo').string())
  .then(value => console.log('foo was:', value))
  .then(() => client.getAll().prefix('f').strings())
  .then(keys => console.log('all our keys starting with "f":', keys))
  .then(() => client.delete().all());

API Documentation

Our TypeDoc docs are available here.

Our test cases are also quite readable.

Contributing

Running tests for this module requires running an etcd3 server locally. The tests try to use the default port initially, and you can configure this by setting the ETCD_ADDR environment variable, like export ETCD_ADDR=localhost:12345.# Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

You can’t perform that action at this time.