resolveOne method
Resolves a single connection parameters by its key.
- correlationId (optional) transaction id to trace execution through call chain.
- key a key to uniquely identify the connection. Return Future that receives found connection or error.
Implementation
@override
Future<ConnectionParams?> resolveOne(
String? correlationId, String key) async {
ConnectionParams? connection;
for (var index = 0; index < _items.length; index++) {
var item = _items[index];
if (item.key == key && item.connection != null) {
connection = item.connection;
break;
}
}
return connection;
}