# etcd3

> Node client for etcd3

Latest version **1.1.2** (published 2023-07-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install etcd3
pnpm add etcd3
yarn add etcd3
bun add etcd3
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2023-07-30 |
| First published | 2017-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 4 |
| Unpacked size | 379.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 546 |
| Author | Connor Peet |
| Maintainers | connor.peet |
| Keywords | etcd3, etcd, node, client, protobuf, proto |

## Links

- npm: https://www.npmjs.com/package/etcd3
- Repository: https://github.com/microsoft/etcd3
- Homepage: https://github.com/microsoft/etcd3#readme
- Issues: https://github.com/microsoft/etcd3/issues
- npm.io page: https://npm.io/package/etcd3

## Dependencies (4)

- [cockatiel](https://npm.io/package/cockatiel.md) ^3.1.1
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^9.1.1
- [@grpc/grpc-js](https://npm.io/package/@grpc/grpc-js.md) ^1.8.20
- [@grpc/proto-loader](https://npm.io/package/@grpc/proto-loader.md) ^0.7.8

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2023-07-30
- 1.1.1 — 2023-07-28
- 1.1.0 — 2020-11-29
- 1.0.2 — 2020-09-19
- 1.0.1 — 2020-06-21
- 1.0.0 — 2020-06-21
- 0.2.13 — 2019-07-03
- 0.2.12 — 2019-07-03
- 0.2.11 — 2018-05-21
- 0.2.10 — 2018-05-06
- 0.2.9 — 2018-02-10
- 0.2.8 — 2018-02-10
- 0.2.7 — 2017-12-31
- 0.2.6 — 2017-11-12
- 0.2.5 — 2017-09-30
- … 7 more at https://npm.io/package/etcd3/versions

## README

# etcd3 [![Run Tests](https://github.com/microsoft/etcd3/workflows/Run%20Tests/badge.svg)](https://github.com/microsoft/etcd3/actions?query=workflow%3A%22Run+Tests%22)

etcd3 is a high-quality, production-ready client for the Protocol Buffer-based [etcd](https://etcd.io/) v3 API. It includes:

- [load balancing](https://microsoft.github.io/etcd3/interfaces/ioptions.html)
- [fault handling and reconnections](https://microsoft.github.io/etcd3/interfaces/ioptions.html#faulthandling)
- [transactions](https://microsoft.github.io/etcd3/classes/comparatorbuilder.html)
- [software transactional memory](https://microsoft.github.io/etcd3/classes/softwaretransaction.html)
- [high-level query builders](https://microsoft.github.io/etcd3/classes/etcd3.html)
- [lease management](https://microsoft.github.io/etcd3/classes/lease.html)
- [watchers](https://microsoft.github.io/etcd3/classes/watchbuilder.html)
- [user](https://microsoft.github.io/etcd3/classes/etcd3.html#user) and [role](https://microsoft.github.io/etcd3/classes/etcd3.html#role) [mocking](https://microsoft.github.io/etcd3/classes/etcd3.html#mock) management
- [elections](https://microsoft.github.io/etcd3/classes/election.html)

and is type-safe for TypeScript consumers.

### Quickstart

Install via:

```
npm install --save etcd3
```

Start building!

```js
const { Etcd3 } = require('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();
})();
```

### API Documentation

Our [TypeDoc docs are available here](https://microsoft.github.io/etcd3/classes/etcd3.html).

Our [test cases](https://github.com/microsoft/etcd3/tree/master/src/test/) are also readable.

### Running tests

```sh
$ npm install
$ cd src/test/containers/3.2 && docker-compose up # in a separate shell
$ npm test
$ docker-compose down
```

### 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`.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

---
_Source: https://npm.io/package/etcd3 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
