mirror of
https://github.com/restic/restic.git
synced 2026-11-23 22:02:40 +00:00
Refactor backup pipeline
This commit is contained in:
1 parent
1516cb5996
commit
ba892e1ec2
9 files changed
+536
-105
No files matched your search
+5
-4
@@ -38,8 +38,9 @@ func TestWalkTree(t *testing.T) {
|
||||
go restic.WalkTree(server, sn.Tree.Storage, done, treeJobs)
|
||||
|
||||
// start filesystem walker
|
||||
fsJobs := make(chan interface{})
|
||||
go pipe.Walk(dirs, done, fsJobs)
|
||||
fsJobs := make(chan pipe.Job)
|
||||
resCh := make(chan pipe.Result, 1)
|
||||
go pipe.Walk(dirs, done, fsJobs, resCh)
|
||||
|
||||
for {
|
||||
// receive fs job
|
||||
@@ -51,10 +52,10 @@ func TestWalkTree(t *testing.T) {
|
||||
fsEntries := 1
|
||||
switch j := fsJob.(type) {
|
||||
case pipe.Dir:
|
||||
path = j.Path
|
||||
path = j.Path()
|
||||
fsEntries = len(j.Entries)
|
||||
case pipe.Entry:
|
||||
path = j.Path
|
||||
path = j.Path()
|
||||
}
|
||||
|
||||
// receive tree job
|
||||
|
||||
Reference in new issue
Block a user