register method
Future<ConnectionParams>
register(
- String? correlationId,
- String key,
- ConnectionParams connection
override
Registers connection parameters into the discovery service.
correlationId
(optional) transaction id to trace execution through call chain.key
a key to uniquely identify the connection parameters.credential
a connection to be registered. Return Future that receives a registered connection or error.
Implementation
@override
Future<ConnectionParams> register(
String? correlationId, String key, ConnectionParams connection) async {
var item = DiscoveryItem();
item.key = key;
item.connection = connection;
_items.add(item);
return connection;
}