IDiscovery

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(IContext? context, String key, ConnectionParams connection)

  • context: IContext - (optional) a context to trace execution through a 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(IContext? context, String key)

  • context: IContext - (optional) a context to trace execution through a 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(IContext? context, String key)

  • context: IContext - (optional) a context to trace execution through a call chain.
  • key: String - key to uniquely identify the connection.
  • returns: Future<ConnectionParams?> - resolved connection.