Refactor backup pipeline

This commit is contained in:
Alexander Neumann committed 2015-03-08 14:16:01 +01:00
1 parent 1516cb5996
commit ba892e1ec2
9 files changed
+536 -105

No files matched your search

+5 -4
View File
@@ -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