restic/internal/backend
Michael Eischer 8e1e3844aa backend: factor out connection limiting and parameter validation
The SemaphoreBackend now uniformly enforces the limit of concurrent
backend operations. In addition, it unifies the parameter validation.

The List() methods no longer uses a semaphore. Restic already never runs
multiple list operations in parallel.

By managing the semaphore in a wrapper backend, the sections that hold a
semaphore token grow slightly. However, the main bottleneck is IO, so
this shouldn't make much of a difference.

The key insight that enables the SemaphoreBackend is that all of the
complex semaphore handling in `openReader()` still happens within the
original call to `Load()`. Thus, getting and releasing the semaphore
tokens can be refactored to happen directly in `Load()`. This eliminates
the need for wrapping the reader in `openReader()` to release the token.
2023-04-14 22:32:15 +02:00
..
azure backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
b2 backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
dryrun dryrun: fix outdated comments 2023-04-14 22:32:15 +02:00
gs backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
layout test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
limiter limiter: move to internal/backend 2022-07-17 13:40:15 +02:00
local backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
location backend, options: Prefer strings.Cut to SplitN 2022-12-02 19:19:14 +01:00
logger backend: extract most debug logs into logger backend 2023-04-14 22:32:15 +02:00
mem backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
mock backend: remove Test method 2022-12-03 11:28:10 +01:00
rclone test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
rest backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
retry retry: Do not retry Stat() if file does not exist 2022-12-03 11:42:48 +01:00
s3 backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
sema backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
sftp backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
swift backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
test test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
testdata Moves files 2017-07-23 14:19:13 +02:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
errdot_119.go rclone/sftp: Improve handling of ErrDot errors 2022-09-25 16:19:03 +02:00
errdot_old.go rclone/sftp: Improve handling of ErrDot errors 2022-09-25 16:19:03 +02:00
foreground.go Sanitize environment before starting backend processes (rclone, ssh) 2020-11-02 16:41:23 +01:00
foreground_sysv.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
foreground_test.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
foreground_unix.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
foreground_windows.go Fix rclone (scoop shim) and sftp issue due to detached console on Windows 2022-04-03 17:53:17 +08:00
http_transport.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
paths.go backend: remove unused Paths variable 2022-10-21 21:36:05 +02:00
readerat.go backend: extract readerat from restic package 2022-07-17 15:29:09 +02:00
shell_split.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
shell_split_test.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
utils.go backend: factor out connection limiting and parameter validation 2023-04-14 22:32:15 +02:00
utils_test.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00