Creates a new instance of discovery service.
(optional) configuration with connection parameters.
Configures component by passing configuration parameters.
configuration parameters to be set.
Reads connections from configuration parameters. Each section represents an individual Connectionparams
configuration parameters to be read
Registers connection parameters into the discovery service.
(optional) transaction id to trace execution through call chain.
a key to uniquely identify the connection parameters.
callback function that receives a registered connection or error.
Resolves all connection parameters by their key.
(optional) transaction id to trace execution through call chain.
a key to uniquely identify the connections.
callback function that receives found connections or error.
Resolves a single connection parameters by its key.
(optional) transaction id to trace execution through call chain.
a key to uniquely identify the connection.
callback function that receives found connection or error.
Generated using TypeDoc
Discovery service that keeps connections in memory.
Configuration parameters
IDiscovery
ConnectionParams
Example
let config = ConfigParams.fromTuples( "key1.host", "10.1.1.100", "key1.port", "8080", "key2.host", "10.1.1.100", "key2.port", "8082" ); let discovery = new MemoryDiscovery(); discovery.readConnections(config); discovery.resolve("123", "key1", (err, connection) => { // Result: host=10.1.1.100;port=8080 });