2.2.0 • Published 8 years ago

consul-kiev v2.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

consul-kiev

Opinionated extraction of values from consul kv store for node.

Install

npm install consul-kiev

Test

npm test

Usage

let c = new consulKiev('localhost');
c.getValues('foo/bar', (err, results) => {
  // check err, use results
});

or using promises:

let c = new consulKiev('localhost');
c.getValues('foo/bar').then(results => {
  // use results
}).catch(err => {
  // handle err
});

cli:

$ consul-kiev -h
Usage:
  consul-kiev --server <server> --port <port> --key <key> --watch <output file>
  consul-kiev -k <key>
  consul-kiev -s <server> -k <key> -w <output file>

$ consul-kiev -k foo/bar
{
  baz: "figz"
}

API

getValues(key, [callback])

  • Extracts from consul recursively from given key
  • Transforms values within consul based on types
  • Supports arrays via JSON within consul values (very hackish; subject to change)
  • callback(err, results)
    • results is an object based on key/values

License

MIT. Copyright 2017-2018: SHRM, Brian Moelk

2.2.0

8 years ago

2.1.0

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago