0.3.0 • Published 9 years ago

klient v0.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

klient

A client for Katalog, the simple Docker service catalog and discovery application

Usage

var klient = require('klient')({
  host: 'http://<host/ip for Katalog>:<katalog port>',
  autoclear: true/false
});

klient.service('<service name>', function (err, nodes) {
  // `nodes` contains all nodes that serves the wanted service
});

klient.value('<key name>', function (err, value) {
  // Get a value from the Katalog key/value store
});

klient.vhosts(function (err, hosts) {
  // Get all virtual hosts from Katalog
});

Options

host

Type: String

The full URI to the Katalog API.

autoclear

Type: Boolean

Default: false

If set items from the internal response cache are removed if they've been there for more than 3 hours.

promise

Type: Boolean

If true the returned api will be promisified, i.e. klient.value('<key>').then(...).

0.3.0

9 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago