ConnectorRegistry
This is the registry for all connectors. The connector service will look up the connector registry based on the task type and version.
Methods
register()
@classmethod
def register(
connector: [AsyncConnector](asyncconnector.md?sid=flyte_connectors__connector_asyncconnector),
override: bool = False
) - > null
Registers a new connector in the global registry and updates its associated metadata. Raises a ValueError if a connector for the same task type and version already exists, unless override is set to True.
Parameters
| Name | Type | Description |
|---|---|---|
| connector | [AsyncConnector](asyncconnector.md?sid=flyte_connectors__connector_asyncconnector) | The asynchronous connector instance to be registered, containing task type and version information. |
| override | bool = False | A flag indicating whether to overwrite an existing registration for the same task type and version. |
Returns
| Type | Description |
|---|---|
null |
get_connector()
@classmethod
def get_connector(
task_type_name: str,
task_type_version: int = 0
) - > [AsyncConnector](asyncconnector.md?sid=flyte_connectors__connector_asyncconnector)
Retrieves a registered connector based on its task type name and version. Throws a FlyteConnectorNotFound exception if no matching connector is found in the registry.
Parameters
| Name | Type | Description |
|---|---|---|
| task_type_name | str | The unique identifier for the type of task the connector handles. |
| task_type_version | int = 0 | The specific version of the task type to retrieve. |
Returns
| Type | Description |
|---|---|
[AsyncConnector](asyncconnector.md?sid=flyte_connectors__connector_asyncconnector) | The connector instance associated with the specified task type and version. |