Puller: refactor + use Task API

* drop rx byte count functionality
* will be re-added to Task as necessary

refs #10
This commit is contained in:
Christian Schwarz
2017-12-26 21:37:48 +01:00
parent 59e34942d1
commit b69089a527
4 changed files with 247 additions and 274 deletions
+3 -4
View File
@@ -147,10 +147,9 @@ outer:
{
log := pullCtx.Value(contextKeyLog).(Logger)
log.Debug("replicating from lhs to rhs")
puller := Puller{j.replTask, local, log, j.Mapping, j.InitialReplPolicy}
if err := puller.Pull(); err != nil {
log.WithError(err).Error("error replicating lhs to rhs")
}
puller := Puller{j.replTask, local, j.Mapping, j.InitialReplPolicy}
puller.Pull()
// use a ctx as soon as Pull gains ctx support
select {
case <-ctx.Done():