Clever/discovery-node

Name: discovery-node

Owner: Clever

Description: Programmatically find services (like discovery-go, but for node)

Created: 2015-09-16 23:47:09.0

Updated: 2016-11-03 07:05:26.0

Pushed: 2018-01-11 18:26:03.0

Homepage: null

Size: 18

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

discovery-node

This library programmatically finds endpoints for dependencies. Similar to discovery-go and discovery-python.

See Service Discovery for more details.

API
Install and import
install --save clever-discovery
offee
overy = require "clever-discovery"
Examples
_gearman = discovery("gearman-admin", "http")
gearman_url = disc_gearman.url() catch err then cb(err)

_systemic = discovery("systemic", "thrift")
systemic_host = disc_systemic.host() catch err then cb(err)
systemic_port = disc_systemic.port() catch err then cb(err)

To see what interfaces a Clever service exposes, check its launch yaml. You should see one or more exposes listed, and the name of the expose is used as the interface value in the discovery client.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.