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

ResolveAllAsync

Resolves all connection parameters by their key.

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

ResolveOneAsync

Resolves a single connection parameters by its key.

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