Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/__init__.py
Show All 13 Lines | |||||
STORAGE_IMPLEMENTATIONS = { | STORAGE_IMPLEMENTATIONS = { | ||||
"remote": ".api.client.RemoteStorage", | "remote": ".api.client.RemoteStorage", | ||||
"memory": ".in_memory.InMemoryStorage", | "memory": ".in_memory.InMemoryStorage", | ||||
"cassandra": ".cassandra.CassandraStorage", | "cassandra": ".cassandra.CassandraStorage", | ||||
"postgresql": ".postgresql.storage.Storage", | "postgresql": ".postgresql.storage.Storage", | ||||
# deprecated | # deprecated | ||||
"local": ".postgresql.storage.Storage", | "local": ".postgresql.storage.Storage", | ||||
# proxy storages | # proxy storages | ||||
"filter": ".proxies.filter.FilteringProxyStorage", | |||||
"buffer": ".proxies.buffer.BufferingProxyStorage", | "buffer": ".proxies.buffer.BufferingProxyStorage", | ||||
"counter": ".proxies.counter.CountingProxyStorage", | |||||
"filter": ".proxies.filter.FilteringProxyStorage", | |||||
"retry": ".proxies.retry.RetryingProxyStorage", | "retry": ".proxies.retry.RetryingProxyStorage", | ||||
"validate": ".proxies.validate.ValidatingProxyStorage", | |||||
"tenacious": ".proxies.tenacious.TenaciousProxyStorage", | "tenacious": ".proxies.tenacious.TenaciousProxyStorage", | ||||
"validate": ".proxies.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 87 Lines • Show Last 20 Lines |