Puller: make main interface public

refs #10
This commit is contained in:
Christian Schwarz
2017-12-26 20:43:15 +01:00
parent 91c4a97f72
commit 59e34942d1
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -148,10 +148,10 @@ 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.doPull(); err != nil {
if err := puller.Pull(); err != nil {
log.WithError(err).Error("error replicating lhs to rhs")
}
// use a ctx as soon as doPull gains ctx support
// use a ctx as soon as Pull gains ctx support
select {
case <-ctx.Done():
break outer
+1 -1
View File
@@ -125,7 +125,7 @@ start:
pullLog := log.WithField(logTaskField, "pull")
puller := Puller{j.task, client, pullLog, j.Mapping, j.InitialReplPolicy}
if err = puller.doPull(); err != nil {
if err = puller.Pull(); err != nil {
log.WithError(err).Error("error doing pull")
}
+1 -1
View File
@@ -60,7 +60,7 @@ type Puller struct {
InitialReplPolicy InitialReplPolicy
}
func (pull *Puller) doPull() (err error) {
func (pull *Puller) Pull() (err error) {
remote := pull.Remote
log := pull.Log