restic/internal/pack
Michael Eischer 120ccc8754 repository: Rework blob saving to use an async pack uploader
Previously, SaveAndEncrypt would assemble blobs into packs and either
return immediately if the pack is not yet full or upload the pack file
otherwise. The upload will block the current goroutine until it
finishes.

Now, the upload is done using separate goroutines. This requires changes
to the error handling. As uploads are no longer tied to a SaveAndEncrypt
call, failed uploads are signaled using an errgroup.

To count the uploaded amount of data, the pack header overhead is no
longer returned by `packer.Finalize` but rather by
`packer.HeaderOverhead`. This helper method is necessary to continue
returning the pack header overhead directly to the responsible call to
`repository.SaveBlob`. Without the method this would not be possible,
as packs are finalized asynchronously.
2022-07-02 22:42:34 +02:00
..
doc.go Moves files 2017-07-23 14:19:13 +02:00
pack.go repository: Rework blob saving to use an async pack uploader 2022-07-02 22:42:34 +02:00
pack_internal_test.go pack: slightly expand testing of compressed blobs 2022-04-30 11:34:10 +02:00
pack_test.go repository: Rework blob saving to use an async pack uploader 2022-07-02 22:42:34 +02:00