Interface for discovery services which are used to store and resolve connection parameters to connect to external services.
Description
The IDiscovery interface is used to create discovery services which are used to store and resolve connection parameters used to connect to external services.
Instance methods
register
Registers connection parameters into the discovery service.
Future<ConnectionParams> register(String? correlationId, String key, ConnectionParams connection)
- correlationId: String? - (optional) transaction id used to trace execution through the call chain.
- key: String - key to uniquely identify the connection parameters.
- connection: ConnectionParams - connection to be registered.
- returns: Future<ConnectionParams> - registered connection parameters.
resolveAll
Resolves all connection parameters by their key.
Future<List<ConnectionParams>> resolveAll(String? correlationId, String key)
- correlationId: String? - (optional) transaction id used to trace execution through the call chain.
- key: String - key to uniquely identify the connections.
- returns: Future<List<ConnectionParams>> - list with resolved connections.
resolveOne
Resolves a single connection parameters by its key.
Future<ConnectionParams?> resolveOne(String? correlationId, String key)
- correlationId: String? - (optional) transaction id used to trace execution through the call chain.
- key: String - key to uniquely identify the connection.
- returns: Future<ConnectionParams?> - resolved connection.