Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/__init__.py
# Copyright (C) 2015-2020 The Software Heritage developers | # Copyright (C) 2015-2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import warnings | import warnings | ||||
class HashCollision(Exception): | |||||
pass | |||||
STORAGE_IMPLEMENTATION = { | STORAGE_IMPLEMENTATION = { | ||||
'pipeline', 'local', 'remote', 'memory', 'filter', 'buffer', 'retry', | 'pipeline', 'local', 'remote', 'memory', 'filter', 'buffer', 'retry', | ||||
'validate', 'cassandra', | 'validate', 'cassandra', | ||||
} | } | ||||
def get_storage(cls, **kwargs): | def get_storage(cls, **kwargs): | ||||
"""Get a storage object of class `storage_class` with arguments | """Get a storage object of class `storage_class` with arguments | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |