1
0
mirror of https://github.com/restic/restic.git synced 2024-06-28 08:00:52 +02:00
restic/internal/restic
Alexander Neumann 99f7fd74e3 backend: Improve Save()
As mentioned in issue [#1560](https://github.com/restic/restic/pull/1560#issuecomment-364689346)
this changes the signature for `backend.Save()`. It now takes a
parameter of interface type `RewindReader`, so that the backend
implementations or our `RetryBackend` middleware can reset the reader to
the beginning and then retry an upload operation.

The `RewindReader` interface also provides a `Length()` method, which is
used in the backend to get the size of the data to be saved. This
removes several ugly hacks we had to do to pull the size back out of the
`io.Reader` passed to `Save()` before. In the `s3` and `rest` backend
this is actively used.
2018-03-03 15:49:44 +01:00
..
testdata Update golden files 2017-09-11 17:52:22 +02:00
backend_find_test.go backend: Rework List() 2018-01-21 18:35:37 +01:00
backend_find.go backend: Rework List() 2018-01-21 18:35:37 +01:00
backend.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
blob_set.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
blob_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
blob.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
buffer.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
cache.go Automatically exclude current restic cache 2017-09-24 21:54:53 +02:00
config_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
config.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
doc.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
file_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
file.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
find_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
find.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
hardlinks_index_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
hardlinks_index.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
id_int_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
id_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
id.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
ids_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
ids.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
idset_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
idset.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
lock_test.go Fix calls to repo/backend.List() everywhere 2018-01-21 21:15:09 +01:00
lock_unix.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
lock_windows.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
lock.go backend/retry: return worker function error and abort 2018-02-24 13:26:13 +01:00
node_darwin.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_freebsd.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_linux.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_openbsd.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_test.go Disable the 'testSticky' test on OpenBSD. Only root can set sticky. 2018-02-11 07:46:31 -07:00
node_unix_test.go Add argument to Skipf() 2018-01-17 23:14:37 +01:00
node_unix.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_windows.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_xattr.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node.go repository/master_index: Optimize Index.Lookup() 2018-01-23 22:25:56 -05:00
progress_unix_with_siginfo.go Handle SIGINFO on all supported platforms 2017-09-02 22:06:31 +03:00
progress_unix.go Handle SIGINFO on all supported platforms 2017-09-02 22:06:31 +03:00
progress.go Control progress rate with RESTIC_PROGRESS_FPS env 2017-10-26 14:46:56 +08:00
rand_reader.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
readerat.go Reworked Backend.Load API to retry errors during ongoing download 2018-02-16 21:12:14 -05:00
repository.go Merge pull request #1549 from MJDSys/more_index_lookup_avoids 2018-01-24 20:53:30 +01:00
restorer_test.go restorer: Set directory mode as last step 2018-01-07 15:13:24 +01:00
restorer.go debug: Remove manual Str() call Log() 2018-01-25 20:49:41 +01:00
rewind_reader_test.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
rewind_reader.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
snapshot_find.go Fix calls to repo/backend.List() everywhere 2018-01-21 21:15:09 +01:00
snapshot_policy_test.go added test cases 2017-09-10 12:23:28 +02:00
snapshot_policy.go removed unnacessary line 2017-09-10 10:41:07 +02:00
snapshot_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
snapshot.go Fix calls to repo/backend.List() everywhere 2018-01-21 21:15:09 +01:00
tag_list.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
testing_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
testing.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00
tree_test.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00
tree.go Allow sorting nodes in trees 2017-09-22 12:37:05 +02:00