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.
register(correlation_id: Optional[str], key: str, connection: ConnectionParams): ConnectionParams
- correlation_id: Optional[str] - (optional) transaction id to trace execution through call chain.
- key: str - a key to uniquely identify the connection parameters.
- connection: ConnectionParams - a connection to be registered.
- returns: ConnectionParams - the registered connection parameters.
resolve_all
Resolves all connection parameters by their key.
resolve_all(correlation_id: Optional[str], key: str): List[ConnectionParams]
- correlation_id: Optional[str] - (optional) transaction id to trace execution through call chain.
- key: str - a key to uniquely identify the connections.
- returns: List[ConnectionParams] - a list with resolved connections.
resolve_one
Resolves a single connection parameters by its key.
resolve_one(correlation_id: Optional[str], key: str): ConnectionParams
- correlation_id: Optional[str] - (optional) transaction id to trace execution through a call chain.
- key: str - a key to uniquely identify the connection.
- returns: ConnectionParams - a resolved connection.