backend_factory
Backend factory for selecting and instantiating results backends in Merlin.
This module defines the MerlinBackendFactory class, which serves as an abstraction
layer for managing available backend implementations. It supports dynamic selection
and instantiation of backend handlers such as Redis or SQLite, based on user input
or system configuration.
The factory maintains mappings of backend names and aliases, and raises a clear error if an unsupported backend is requested.
MerlinBackendFactory
Bases: MerlinBaseFactory
Factory class for managing and instantiating supported Merlin backends.
This subclass of MerlinBaseFactory handles registration, validation,
and instantiation of results backends (e.g., Redis, SQLite).
Attributes:
| Name | Type | Description |
|---|---|---|
_registry |
Dict[str, ResultsBackend]
|
Maps canonical backend names to backend classes. |
_aliases |
Dict[str, str]
|
Maps legacy or alternate names to canonical backend names. |
Methods:
| Name | Description |
|---|---|
register |
Register a new backend class and optional aliases. |
list_available |
Return a list of supported backend names. |
create |
Instantiate a backend class by name or alias. |
get_component_info |
Return metadata about a registered backend. |