Browse Source

clientv3: move syncer to mirror package

to be in line with sync meaning process synchronization, not data
synchronization
Anthony Romano 9 years ago
parent
commit
9f569842f0

+ 1 - 1
clientv3/sync/syncer.go → clientv3/mirror/syncer.go

@@ -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"

+ 2 - 2
etcdctlv3/command/make_mirror_command.go

@@ -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)
 

+ 2 - 2
etcdctlv3/command/snapshot_command.go

@@ -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())