etcd3-ts
TypeScript icon, indicating that this package has built-in type declarations

1.4.1 • Public • Published

etcd3-ts

NPM version Build Status Coverage Status

This is an etcd client. It's very incomplete.

Usage

$ npm install etcd3-ts

Then in your code:

import { EtcdClient } from 'etcd3-ts';
import { delay } from 'promise-tools';
 
const client = new EtcdClient('localhost:2379');
 
async myFunction() {
  await client.withLock('mylock', async () => {
    console.log('Do work here...');
    await delay(2000);
  });
}

How to build this?

Checkout etcd, and then run genGrpc.sh.

$ git clone git@github.com:etcd-io/etcd.git
cd etcd
$ git checkout v3.4.9
cd ..
$ ./scripts/genGrpc.sh
$ npm run build

Readme

Keywords

Package Sidebar

Install

npm i etcd3-ts

Weekly Downloads

4

Version

1.4.1

License

MIT

Unpacked Size

2.26 MB

Total Files

80

Last publish

Collaborators

  • jwalton