swh.storage.proxies.masking package#


Module contents#

swh.storage.proxies.masking.get_datastore(cls, db)[source]#
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(masking_db: str, storage: Dict | StorageInterface, min_pool_conns: int = 1, max_pool_conns: int = 5)[source]#

Bases: object

Masking storage proxy

This proxy filters out objects that are present in the archive but should not be displayed for policy reasons.

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

content_get_data(content: HashDict | bytes) bytes | None[source]#
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]#
revision_get_partition(partition_id: int, nb_partitions: int, page_token: str | None = None, limit: int = 1000) PagedResult[Revision, str][source]#
release_get(releases: List[bytes], ignore_displayname: bool = False) List[Release | None][source]#
release_get_partition(partition_id: int, nb_partitions: int, page_token: str | None = None, limit: int = 1000) PagedResult[Release, str][source]#