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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This library programmatically finds endpoints for dependencies. Similar to discovery-go and discovery-python.
See Service Discovery for more details.
install --save clever-discovery
offee
overy = require "clever-discovery"
_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.