clientv3: move syncer to mirror package

to be in line with sync meaning process synchronization, not data
synchronization
This commit is contained in:
Anthony Romano 2016-02-23 17:45:43 -08:00
parent bbdff697db
commit 9f569842f0
3 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package sync
package mirror
import (
"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context"

View File

@ -23,7 +23,7 @@ import (
"github.com/coreos/etcd/Godeps/_workspace/src/github.com/spf13/cobra"
"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/sync"
"github.com/coreos/etcd/clientv3/mirror"
"github.com/coreos/etcd/etcdserver/api/v3rpc"
"github.com/coreos/etcd/storage/storagepb"
)
@ -77,7 +77,7 @@ func makeMirror(ctx context.Context, c *clientv3.Client, dc *clientv3.Client) er
// TODO: remove the prefix of the destination cluster?
dkv := clientv3.NewKV(dc)
s := sync.NewSyncer(c, mmprefix, 0)
s := mirror.NewSyncer(c, mmprefix, 0)
rc, errc := s.SyncBase(ctx)

View File

@ -22,7 +22,7 @@ import (
"github.com/coreos/etcd/Godeps/_workspace/src/github.com/spf13/cobra"
"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/sync"
"github.com/coreos/etcd/clientv3/mirror"
"github.com/coreos/etcd/etcdserver/api/v3rpc"
)
@ -90,7 +90,7 @@ func snapshotToFile(c *clientv3.Client, path string) {
// snapshot reads all of a watcher; returns compaction revision if incomplete
// TODO: stabilize snapshot format
func snapshot(w io.Writer, c *clientv3.Client, rev int64) int64 {
s := sync.NewSyncer(c, "", rev)
s := mirror.NewSyncer(c, "", rev)
rc, errc := s.SyncBase(context.TODO())