base-org / blob-archiver

MIT License
103 stars 62 forks source link

Add Rearchive API #7

Closed danyalprout closed 9 months ago

danyalprout commented 9 months ago

Description

This PR adds a new API on the archiver process POST /rearchive?from=<slot>&to=<slot>. When invoked this API will travese all the slots in this range and overwrite the data stored in the data store.

The majority of the changes in this PR is splitting the archiving logic out of the service and moving it into it's own Archiver struct in archiver.go. This allows both the API and background job to interact with the archiving logic.