From 9f569842f0f666c85f81838b99ea415336c81b81 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Tue, 23 Feb 2016 17:45:43 -0800 Subject: [PATCH] clientv3: move syncer to mirror package to be in line with sync meaning process synchronization, not data synchronization --- clientv3/{sync => mirror}/syncer.go | 2 +- etcdctlv3/command/make_mirror_command.go | 4 ++-- etcdctlv3/command/snapshot_command.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename clientv3/{sync => mirror}/syncer.go (99%) diff --git a/clientv3/sync/syncer.go b/clientv3/mirror/syncer.go similarity index 99% rename from clientv3/sync/syncer.go rename to clientv3/mirror/syncer.go index 06c4007fd..f9faaed3d 100644 --- a/clientv3/sync/syncer.go +++ b/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" diff --git a/etcdctlv3/command/make_mirror_command.go b/etcdctlv3/command/make_mirror_command.go index 53294689c..abef26ecf 100644 --- a/etcdctlv3/command/make_mirror_command.go +++ b/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) diff --git a/etcdctlv3/command/snapshot_command.go b/etcdctlv3/command/snapshot_command.go index 3746630e3..0dcc868cb 100644 --- a/etcdctlv3/command/snapshot_command.go +++ b/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())