Add support for kafka journalization of the ProvenanceStorageInterface
the new ProvenanceStorageJournal is a proxy ProvenanceStorageInterface that will push added objects in a swh-journal (typ. a kafka). Journal messages are simple dicts with 2 keys: id (the sharding key) and value (a serialiazable version of the argument of the xxx_add() method). Use the 'kafka' pytest marker for all kafka-related tests (especially used for tox, see tox.ini).
Showing
- swh/provenance/storage/__init__.py 9 additions, 0 deletionsswh/provenance/storage/__init__.py
- swh/provenance/storage/journal.py 152 additions, 0 deletionsswh/provenance/storage/journal.py
- swh/provenance/tests/test_journal_client.py 2 additions, 0 deletionsswh/provenance/tests/test_journal_client.py
- swh/provenance/tests/test_provenance_journal_writer.py 193 additions, 0 deletionsswh/provenance/tests/test_provenance_journal_writer.py
- swh/provenance/tests/test_provenance_journal_writer_kafka.py 46 additions, 0 deletionsswh/provenance/tests/test_provenance_journal_writer_kafka.py
- tox.ini 2 additions, 2 deletionstox.ini
swh/provenance/storage/journal.py
0 → 100644
Please register or sign in to comment