register method
Registers the given connection in all referenced discovery services. This method can be used for dynamic service discovery.
correlationId
(optional) transaction id to trace execution through call chain.connection
a connection to register. Return future that receives null is registered connection is succes. Throws error
Implementation
Future register(String? correlationId) async {
var connection = await connectionResolver.resolve(correlationId);
var credential = await credentialResolver.lookup(correlationId);
_validateConnection(correlationId, connection, credential);
await connectionResolver.register(
correlationId, connection ?? ConnectionParams());
}