Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🔖 Node.js client for etcd3

License

NotificationsYou must be signed in to change notification settings

microsoft/etcd3

Repository files navigation

etcd3 is a high-quality, production-ready client for the Protocol Buffer-basedetcd v3 API. It includes:

and is type-safe for TypeScript consumers.

Quickstart

Install via:

npm install --save etcd3

Start building!

const{ Etcd3}=require('etcd3');constclient=newEtcd3();(async()=>{awaitclient.put('foo').value('bar');constfooValue=awaitclient.get('foo').string();console.log('foo was:',fooValue);constallFValues=awaitclient.getAll().prefix('f').keys();console.log('all our keys starting with "f":',allFValues);awaitclient.delete().all();})();

API Documentation

OurTypeDoc docs are available here.

Ourtest cases are also readable.

Running tests

$ npm install$cd src/test/containers/3.2&& docker-compose up# in a separate shell$ npmtest$ 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 theETCD_ADDR environment variable, likeexport ETCD_ADDR=localhost:12345.

This project has adopted theMicrosoft Open Source Code of Conduct. For more information see theCode of Conduct FAQ or contactopencode@microsoft.com with any additional questions or comments.


[8]ページ先頭

©2009-2025 Movatter.jp