restic/internal/restorer
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 Fix typos reported by misspell 2020-10-06 14:55:13 +02:00
filerestorer.go repository: implement pack compression 2022-04-30 11:34:10 +02:00
filerestorer_test.go restorer: convert to use StreamPack 2022-02-12 20:18:25 +01:00
fileswriter.go Add more error handling 2021-01-30 20:19:47 +01:00
fileswriter_test.go restorer: pre-allocate files before loading chunks 2020-09-07 21:41:47 +02:00
preallocate_darwin.go Use FcntlFstore to preallocate on Mac 2021-04-10 16:54:07 +02:00
preallocate_linux.go restorer: pre-allocate files before loading chunks 2020-09-07 21:41:47 +02:00
preallocate_other.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
preallocate_test.go restorer: Skip preallocate test if not supported by the filesystem 2021-03-04 20:33:46 +01:00
restorer.go restore: Fix linting error 2021-09-19 14:41:07 +02:00
restorer_test.go repository: Rework blob saving to use an async pack uploader 2022-07-02 22:42:34 +02:00
restorer_unix_test.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00