Co Etcd
A promise/co wrapper for the node-etcd module. All functions from node-etcd are supported, but are converted to return a promise
'use strict'; let CoEtcd = ;let co = ; ;
Additions
etcd.nodeToTree()
Arguments
- Javascript object in etcd node format
Returns
- Node format converted into a JSON tree object
Example
let config = etcd;console;/*{ "action": "get", "node": { "key": "/config", "dir": true, "nodes": [ { "key": "/config/etcd", "dir": true, "nodes": [ { "key": "/config/etcd/host", "value": "somefoohost.com", "modifiedIndex": 2280, "createdIndex": 2280 }, { "key": "/config/etcd/active", "value": "true", "modifiedIndex": 2281, "createdIndex": 2281 } ], "modifiedIndex": 1086, "createdIndex": 1086 } ] }}*/ config = etcd;console;/*{ config: { etcd: { host: "somefoohost", active: true } }}*/