enforce encapsulation by breaking up replication package into packages

not perfect yet, public shouldn't be required to use 'common' package to
use replication package
This commit is contained in:
Christian Schwarz
2018-08-16 21:05:21 +02:00
parent c7d28fee8f
commit 38532abf45
22 changed files with 1057 additions and 1491 deletions
+4 -2
View File
@@ -8,7 +8,8 @@ import (
"github.com/pkg/errors"
"github.com/zrepl/zrepl/zfs"
"sync"
"github.com/zrepl/zrepl/cmd/replication.v2"
"github.com/zrepl/zrepl/cmd/replication"
"github.com/zrepl/zrepl/cmd/replication/common"
)
type LocalJob struct {
@@ -146,7 +147,8 @@ outer:
j.mainTask.Log().Debug("replicating from lhs to rhs")
j.mainTask.Enter("replicate")
replication.Replicate(ctx, replication.NewEndpointPairPull(sender, receiver), nil) // FIXME
rep := replication.NewReplication()
rep.Drive(ctx, common.NewEndpointPairPull(sender, receiver))
j.mainTask.Finish()