swh.storage.proxies.masking package#
Submodules#
- swh.storage.proxies.masking.cli module
- swh.storage.proxies.masking.db module
DuplicateRequest
RequestNotFound
MaskedState
MaskedStatus
MaskingRequest
MaskingRequestHistory
MaskedObject
DisplayName
MaskingDb
MaskingAdmin
MaskingAdmin.create_request()
MaskingAdmin.find_request()
MaskingAdmin.find_request_by_id()
MaskingAdmin.get_requests()
MaskingAdmin.set_object_state()
MaskingAdmin.get_states_for_request()
MaskingAdmin.find_masks()
MaskingAdmin.delete_masks()
MaskingAdmin.record_history()
MaskingAdmin.get_history()
MaskingAdmin.set_display_name()
MaskingAdmin.set_display_names()
MaskingQuery
Module contents#
- swh.storage.proxies.masking.masking_overhead_timer(method_name: str) DifferentialTimer [source]#
Return a properly setup DifferentialTimer for
method_name
of the storage
- class swh.storage.proxies.masking.MaskingProxyStorage(storage: Dict | StorageInterface, db: str | None = None, masking_db: str | None = None, min_pool_conns: int = 1, max_pool_conns: int = 5)[source]#
Bases:
object
Masking storage proxy
This proxy can return modified objects or stop them from being retrieved at all.
It uses a specific PostgreSQL database (which for now is colocated with the swh.storage PostgreSQL database), the access to which is implemented in the
db
submodule.Sample configuration
- RANDOM_ATTEMPTS = 5#
- TRevision = ~TRevision#
- TRelease = ~TRelease#
- revision_get(revision_ids: List[bytes], ignore_displayname: bool = False) List[Revision | None] [source]#
- revision_log(revisions: List[bytes], ignore_displayname: bool = False, limit: int | None = None) Iterable[Dict[str, Any] | None] [source]#