Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/__init__.py
Show All 12 Lines | |||||
STORAGE_IMPLEMENTATIONS = { | STORAGE_IMPLEMENTATIONS = { | ||||
"local": ".postgresql.storage.Storage", | "local": ".postgresql.storage.Storage", | ||||
"remote": ".api.client.RemoteStorage", | "remote": ".api.client.RemoteStorage", | ||||
"memory": ".in_memory.InMemoryStorage", | "memory": ".in_memory.InMemoryStorage", | ||||
"filter": ".filter.FilteringProxyStorage", | "filter": ".filter.FilteringProxyStorage", | ||||
"buffer": ".buffer.BufferingProxyStorage", | "buffer": ".buffer.BufferingProxyStorage", | ||||
"retry": ".retry.RetryingProxyStorage", | "retry": ".retry.RetryingProxyStorage", | ||||
"cassandra": ".cassandra.CassandraStorage", | "cassandra": ".cassandra.CassandraStorage", | ||||
"validate": ".validate.ValidatingProxyStorage", | |||||
} | } | ||||
def get_storage(cls: str, **kwargs) -> StorageInterface: | def get_storage(cls: str, **kwargs) -> StorageInterface: | ||||
"""Get a storage object of class `storage_class` with arguments | """Get a storage object of class `storage_class` with arguments | ||||
`storage_args`. | `storage_args`. | ||||
Args: | Args: | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |