mirror of
https://github.com/restic/restic.git
synced 2026-10-13 05:27:13 +00:00
local/sftp: move limiter setup into backend
This commit is contained in:
1 parent
7d12c29286
commit
9aa9e0d1ec
4 files changed
+17
-15
No files matched your search
@@ -31,11 +31,7 @@ type Local struct {
|
||||
var _ restic.Backend = &Local{}
|
||||
|
||||
func NewFactory() location.Factory {
|
||||
return location.NewLimitedBackendFactory(ParseConfig, location.NoPassword, func(ctx context.Context, cfg Config, _ limiter.Limiter) (*Local, error) {
|
||||
return Create(ctx, cfg)
|
||||
}, func(ctx context.Context, cfg Config, _ limiter.Limiter) (*Local, error) {
|
||||
return Open(ctx, cfg)
|
||||
})
|
||||
return location.NewLimitedBackendFactory(ParseConfig, location.NoPassword, limiter.WrapBackendConstructor(Create), limiter.WrapBackendConstructor(Open))
|
||||
}
|
||||
|
||||
const defaultLayout = "default"
|
||||
|
||||
Reference in new issue
Block a user