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 to connect to external services.

Instance methods

RegisterAsync

Registers connection parameters into the discovery service.

Task<ConnectionParams> RegisterAsync(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: Task<ConnectionParams> - registered connection parameters.

ResolveAllAsync

Resolves all connection parameters by their key.

Task<List<ConnectionParams>> ResolveAllAsync(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: Task<List<ConnectionParams>> - list with resolved connections.

ResolveOneAsync

Resolves a single connection parameters by its key.

Task<ConnectionParams> ResolveOneAsync(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: Task<ConnectionParams> - resolved connection.