The base connection resolver.
Configures component by passing configuration parameters.
configuration parameters to be set.
Registers the given connection in all referenced discovery services. This method can be used for dynamic service discovery.
(optional) transaction id to trace execution through call chain.
callback function that receives registered connection or error.
Resolves a single component connection. If connections are configured to be retrieved from Discovery service it finds a IDiscovery and resolves the connection there.
(optional) transaction id to trace execution through call chain.
callback function that receives resolved connection or error.
Resolves all component connection. If connections are configured to be retrieved from Discovery service it finds a IDiscovery and resolves the connection there.
(optional) transaction id to trace execution through call chain.
callback function that receives resolved connections or error.
Sets references to dependent components.
references to locate the component dependencies.
Generated using TypeDoc
Helper class to retrieve connections for HTTP-based services abd clients.
In addition to regular functions of ConnectionResolver is able to parse http:// URIs and validate connection parameters before returning them.
Configuration parameters
connection:
connections: alternative to connection
References
*:discovery:*:*:1.0
(optional) IDiscovery servicesConnectionParams
ConnectionResolver
Example
let config = ConfigParams.fromTuples( "connection.host", "10.1.1.100", "connection.port", 8080 ); let connectionResolver = new HttpConnectionResolver(); connectionResolver.configure(config); connectionResolver.setReferences(references); connectionResolver.resolve("123", (err, connection) => { // Now use connection... });