From 80d15948bcfc93aabd2c5245d7993c8a9e76bf8f Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Fri, 26 Jan 2018 11:14:41 -0800 Subject: [PATCH] *: move "mvcc" to "internal/mvcc" Signed-off-by: Gyuho Lee --- auth/range_perm_cache.go | 2 +- auth/store.go | 2 +- auth/store_test.go | 2 +- clientv3/concurrency/election.go | 2 +- clientv3/concurrency/key.go | 2 +- clientv3/integration/kv_test.go | 2 +- clientv3/integration/maintenance_test.go | 4 ++-- clientv3/integration/mirror_test.go | 2 +- clientv3/integration/namespace_test.go | 2 +- clientv3/integration/watch_test.go | 2 +- clientv3/leasing/cache.go | 2 +- clientv3/leasing/kv.go | 2 +- clientv3/watch.go | 2 +- clientv3/watch_test.go | 2 +- contrib/recipes/barrier.go | 2 +- contrib/recipes/client.go | 2 +- contrib/recipes/double_barrier.go | 2 +- contrib/recipes/priority_queue.go | 2 +- contrib/recipes/queue.go | 2 +- contrib/recipes/rwmutex.go | 2 +- contrib/recipes/watch.go | 2 +- e2e/etcd_corrupt_test.go | 2 +- etcdctl/ctlv3/command/defrag_command.go | 2 +- etcdctl/ctlv3/command/make_mirror_command.go | 2 +- etcdctl/ctlv3/command/migrate_command.go | 6 +++--- etcdctl/ctlv3/command/printer_fields.go | 2 +- etcdctl/ctlv3/command/printer_protobuf.go | 2 +- etcdctl/ctlv3/command/util.go | 2 +- etcdserver/api/v2v3/store.go | 2 +- etcdserver/api/v3election/v3electionpb/v3election.pb.go | 2 +- etcdserver/api/v3rpc/maintenance.go | 4 ++-- etcdserver/api/v3rpc/util.go | 2 +- etcdserver/api/v3rpc/util_test.go | 2 +- etcdserver/api/v3rpc/watch.go | 4 ++-- etcdserver/apply.go | 4 ++-- etcdserver/apply_auth.go | 2 +- etcdserver/backend.go | 4 ++-- etcdserver/corrupt.go | 2 +- etcdserver/etcdserverpb/rpc.pb.go | 2 +- etcdserver/membership/cluster.go | 2 +- etcdserver/membership/store.go | 2 +- etcdserver/server.go | 4 ++-- etcdserver/server_test.go | 4 ++-- etcdserver/snapshot_merge.go | 2 +- etcdserver/v3_server.go | 2 +- integration/v3_alarm_test.go | 4 ++-- integration/v3_lease_test.go | 2 +- integration/v3_lock_test.go | 2 +- integration/v3_watch_test.go | 2 +- internal/alarm/alarms.go | 2 +- internal/compactor/periodic.go | 2 +- internal/compactor/revision.go | 2 +- internal/lease/leasehttp/http_test.go | 2 +- internal/lease/lessor.go | 2 +- internal/lease/lessor_test.go | 2 +- {mvcc => internal/mvcc}/backend/backend.go | 0 {mvcc => internal/mvcc}/backend/backend_bench_test.go | 0 {mvcc => internal/mvcc}/backend/backend_test.go | 0 {mvcc => internal/mvcc}/backend/batch_tx.go | 0 {mvcc => internal/mvcc}/backend/batch_tx_test.go | 0 {mvcc => internal/mvcc}/backend/config_default.go | 0 {mvcc => internal/mvcc}/backend/config_linux.go | 0 {mvcc => internal/mvcc}/backend/config_windows.go | 0 {mvcc => internal/mvcc}/backend/doc.go | 0 {mvcc => internal/mvcc}/backend/metrics.go | 0 {mvcc => internal/mvcc}/backend/read_tx.go | 0 {mvcc => internal/mvcc}/backend/tx_buffer.go | 0 {mvcc => internal/mvcc}/doc.go | 0 {mvcc => internal/mvcc}/index.go | 0 {mvcc => internal/mvcc}/index_test.go | 0 {mvcc => internal/mvcc}/key_index.go | 0 {mvcc => internal/mvcc}/key_index_test.go | 0 {mvcc => internal/mvcc}/kv.go | 4 ++-- {mvcc => internal/mvcc}/kv_test.go | 4 ++-- {mvcc => internal/mvcc}/kv_view.go | 0 {mvcc => internal/mvcc}/kvstore.go | 4 ++-- {mvcc => internal/mvcc}/kvstore_bench_test.go | 2 +- {mvcc => internal/mvcc}/kvstore_compaction.go | 0 {mvcc => internal/mvcc}/kvstore_compaction_test.go | 2 +- {mvcc => internal/mvcc}/kvstore_test.go | 4 ++-- {mvcc => internal/mvcc}/kvstore_txn.go | 4 ++-- {mvcc => internal/mvcc}/metrics.go | 0 {mvcc => internal/mvcc}/metrics_txn.go | 0 {mvcc => internal/mvcc}/mvccpb/kv.pb.go | 0 {mvcc => internal/mvcc}/mvccpb/kv.proto | 0 {mvcc => internal/mvcc}/revision.go | 0 {mvcc => internal/mvcc}/revision_test.go | 0 {mvcc => internal/mvcc}/util.go | 4 ++-- {mvcc => internal/mvcc}/watchable_store.go | 4 ++-- {mvcc => internal/mvcc}/watchable_store_bench_test.go | 2 +- {mvcc => internal/mvcc}/watchable_store_test.go | 4 ++-- {mvcc => internal/mvcc}/watchable_store_txn.go | 4 +--- {mvcc => internal/mvcc}/watcher.go | 2 +- {mvcc => internal/mvcc}/watcher_bench_test.go | 2 +- {mvcc => internal/mvcc}/watcher_group.go | 2 +- {mvcc => internal/mvcc}/watcher_test.go | 4 ++-- proxy/grpcproxy/watcher.go | 4 ++-- snapshot/v3_snapshot.go | 4 ++-- tools/benchmark/cmd/mvcc.go | 4 ++-- tools/etcd-dump-db/backend.go | 6 +++--- 100 files changed, 99 insertions(+), 101 deletions(-) rename {mvcc => internal/mvcc}/backend/backend.go (100%) rename {mvcc => internal/mvcc}/backend/backend_bench_test.go (100%) rename {mvcc => internal/mvcc}/backend/backend_test.go (100%) rename {mvcc => internal/mvcc}/backend/batch_tx.go (100%) rename {mvcc => internal/mvcc}/backend/batch_tx_test.go (100%) rename {mvcc => internal/mvcc}/backend/config_default.go (100%) rename {mvcc => internal/mvcc}/backend/config_linux.go (100%) rename {mvcc => internal/mvcc}/backend/config_windows.go (100%) rename {mvcc => internal/mvcc}/backend/doc.go (100%) rename {mvcc => internal/mvcc}/backend/metrics.go (100%) rename {mvcc => internal/mvcc}/backend/read_tx.go (100%) rename {mvcc => internal/mvcc}/backend/tx_buffer.go (100%) rename {mvcc => internal/mvcc}/doc.go (100%) rename {mvcc => internal/mvcc}/index.go (100%) rename {mvcc => internal/mvcc}/index_test.go (100%) rename {mvcc => internal/mvcc}/key_index.go (100%) rename {mvcc => internal/mvcc}/key_index_test.go (100%) rename {mvcc => internal/mvcc}/kv.go (98%) rename {mvcc => internal/mvcc}/kv_test.go (99%) rename {mvcc => internal/mvcc}/kv_view.go (100%) rename {mvcc => internal/mvcc}/kvstore.go (99%) rename {mvcc => internal/mvcc}/kvstore_bench_test.go (98%) rename {mvcc => internal/mvcc}/kvstore_compaction.go (100%) rename {mvcc => internal/mvcc}/kvstore_compaction_test.go (98%) rename {mvcc => internal/mvcc}/kvstore_test.go (99%) rename {mvcc => internal/mvcc}/kvstore_txn.go (98%) rename {mvcc => internal/mvcc}/metrics.go (100%) rename {mvcc => internal/mvcc}/metrics_txn.go (100%) rename {mvcc => internal/mvcc}/mvccpb/kv.pb.go (100%) rename {mvcc => internal/mvcc}/mvccpb/kv.proto (100%) rename {mvcc => internal/mvcc}/revision.go (100%) rename {mvcc => internal/mvcc}/revision_test.go (100%) rename {mvcc => internal/mvcc}/util.go (93%) rename {mvcc => internal/mvcc}/watchable_store.go (99%) rename {mvcc => internal/mvcc}/watchable_store_bench_test.go (99%) rename {mvcc => internal/mvcc}/watchable_store_test.go (99%) rename {mvcc => internal/mvcc}/watchable_store_txn.go (96%) rename {mvcc => internal/mvcc}/watcher.go (99%) rename {mvcc => internal/mvcc}/watcher_bench_test.go (95%) rename {mvcc => internal/mvcc}/watcher_group.go (99%) rename {mvcc => internal/mvcc}/watcher_test.go (99%) diff --git a/auth/range_perm_cache.go b/auth/range_perm_cache.go index 691b65ba3..62acdf26d 100644 --- a/auth/range_perm_cache.go +++ b/auth/range_perm_cache.go @@ -16,7 +16,7 @@ package auth import ( "github.com/coreos/etcd/auth/authpb" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/pkg/adt" ) diff --git a/auth/store.go b/auth/store.go index d379ffa8e..e93560896 100644 --- a/auth/store.go +++ b/auth/store.go @@ -26,7 +26,7 @@ import ( "github.com/coreos/etcd/auth/authpb" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/pkg/capnslog" "golang.org/x/crypto/bcrypt" diff --git a/auth/store_test.go b/auth/store_test.go index b4eaa5e74..739d8fcde 100644 --- a/auth/store_test.go +++ b/auth/store_test.go @@ -26,7 +26,7 @@ import ( "github.com/coreos/etcd/auth/authpb" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" "golang.org/x/crypto/bcrypt" "google.golang.org/grpc/metadata" diff --git a/clientv3/concurrency/election.go b/clientv3/concurrency/election.go index e18a0ed4a..84156a374 100644 --- a/clientv3/concurrency/election.go +++ b/clientv3/concurrency/election.go @@ -21,7 +21,7 @@ import ( v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) var ( diff --git a/clientv3/concurrency/key.go b/clientv3/concurrency/key.go index 4b6e399bd..4d11ffef6 100644 --- a/clientv3/concurrency/key.go +++ b/clientv3/concurrency/key.go @@ -20,7 +20,7 @@ import ( v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) func waitDelete(ctx context.Context, client *v3.Client, key string, rev int64) error { diff --git a/clientv3/integration/kv_test.go b/clientv3/integration/kv_test.go index 66de753cd..81630c53e 100644 --- a/clientv3/integration/kv_test.go +++ b/clientv3/integration/kv_test.go @@ -26,7 +26,7 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/integration" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" "google.golang.org/grpc" diff --git a/clientv3/integration/maintenance_test.go b/clientv3/integration/maintenance_test.go index d0ac32647..7db1938bc 100644 --- a/clientv3/integration/maintenance_test.go +++ b/clientv3/integration/maintenance_test.go @@ -27,8 +27,8 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/integration" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/clientv3/integration/mirror_test.go b/clientv3/integration/mirror_test.go index 01bfef10a..9a2bac522 100644 --- a/clientv3/integration/mirror_test.go +++ b/clientv3/integration/mirror_test.go @@ -24,7 +24,7 @@ import ( "github.com/coreos/etcd/clientv3/mirror" "github.com/coreos/etcd/integration" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/clientv3/integration/namespace_test.go b/clientv3/integration/namespace_test.go index b952d333d..f884b17b1 100644 --- a/clientv3/integration/namespace_test.go +++ b/clientv3/integration/namespace_test.go @@ -22,7 +22,7 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/namespace" "github.com/coreos/etcd/integration" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/clientv3/integration/watch_test.go b/clientv3/integration/watch_test.go index f9ac47b4a..a3559faa7 100644 --- a/clientv3/integration/watch_test.go +++ b/clientv3/integration/watch_test.go @@ -27,7 +27,7 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/integration" - mvccpb "github.com/coreos/etcd/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" "google.golang.org/grpc" diff --git a/clientv3/leasing/cache.go b/clientv3/leasing/cache.go index 77a1d06c8..5df1d842a 100644 --- a/clientv3/leasing/cache.go +++ b/clientv3/leasing/cache.go @@ -22,7 +22,7 @@ import ( v3 "github.com/coreos/etcd/clientv3" v3pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) const revokeBackoff = 2 * time.Second diff --git a/clientv3/leasing/kv.go b/clientv3/leasing/kv.go index 051a8fceb..026320700 100644 --- a/clientv3/leasing/kv.go +++ b/clientv3/leasing/kv.go @@ -24,7 +24,7 @@ import ( "github.com/coreos/etcd/clientv3/concurrency" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/clientv3/watch.go b/clientv3/watch.go index 312845cbe..9452d0d92 100644 --- a/clientv3/watch.go +++ b/clientv3/watch.go @@ -22,7 +22,7 @@ import ( v3rpc "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - mvccpb "github.com/coreos/etcd/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/internal/mvcc/mvccpb" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/clientv3/watch_test.go b/clientv3/watch_test.go index 8d3380522..1edb4a843 100644 --- a/clientv3/watch_test.go +++ b/clientv3/watch_test.go @@ -17,7 +17,7 @@ package clientv3 import ( "testing" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) func TestEvent(t *testing.T) { diff --git a/contrib/recipes/barrier.go b/contrib/recipes/barrier.go index 6e9281721..7dc18cdbd 100644 --- a/contrib/recipes/barrier.go +++ b/contrib/recipes/barrier.go @@ -18,7 +18,7 @@ import ( "context" v3 "github.com/coreos/etcd/clientv3" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) // Barrier creates a key in etcd to block processes, then deletes the key to diff --git a/contrib/recipes/client.go b/contrib/recipes/client.go index 111b0b40c..79b23a828 100644 --- a/contrib/recipes/client.go +++ b/contrib/recipes/client.go @@ -19,7 +19,7 @@ import ( "errors" v3 "github.com/coreos/etcd/clientv3" - spb "github.com/coreos/etcd/mvcc/mvccpb" + spb "github.com/coreos/etcd/internal/mvcc/mvccpb" ) var ( diff --git a/contrib/recipes/double_barrier.go b/contrib/recipes/double_barrier.go index 93cc61b4f..27ff76ab3 100644 --- a/contrib/recipes/double_barrier.go +++ b/contrib/recipes/double_barrier.go @@ -19,7 +19,7 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) // DoubleBarrier blocks processes on Enter until an expected count enters, then diff --git a/contrib/recipes/priority_queue.go b/contrib/recipes/priority_queue.go index 2378ce2f8..8be0db74f 100644 --- a/contrib/recipes/priority_queue.go +++ b/contrib/recipes/priority_queue.go @@ -19,7 +19,7 @@ import ( "fmt" v3 "github.com/coreos/etcd/clientv3" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) // PriorityQueue implements a multi-reader, multi-writer distributed queue. diff --git a/contrib/recipes/queue.go b/contrib/recipes/queue.go index 5d0423a42..33a8f31b3 100644 --- a/contrib/recipes/queue.go +++ b/contrib/recipes/queue.go @@ -18,7 +18,7 @@ import ( "context" v3 "github.com/coreos/etcd/clientv3" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) // Queue implements a multi-reader, multi-writer distributed queue. diff --git a/contrib/recipes/rwmutex.go b/contrib/recipes/rwmutex.go index 1213b7e42..436ee0917 100644 --- a/contrib/recipes/rwmutex.go +++ b/contrib/recipes/rwmutex.go @@ -19,7 +19,7 @@ import ( v3 "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) type RWMutex struct { diff --git a/contrib/recipes/watch.go b/contrib/recipes/watch.go index 536787227..7226a8ea7 100644 --- a/contrib/recipes/watch.go +++ b/contrib/recipes/watch.go @@ -18,7 +18,7 @@ import ( "context" "github.com/coreos/etcd/clientv3" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) // WaitEvents waits on a key until it observes the given events and returns the final one. diff --git a/e2e/etcd_corrupt_test.go b/e2e/etcd_corrupt_test.go index a2bbb4c42..aa6020e4f 100644 --- a/e2e/etcd_corrupt_test.go +++ b/e2e/etcd_corrupt_test.go @@ -24,7 +24,7 @@ import ( "time" "github.com/coreos/etcd/clientv3" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" bolt "github.com/coreos/bbolt" ) diff --git a/etcdctl/ctlv3/command/defrag_command.go b/etcdctl/ctlv3/command/defrag_command.go index a7e6f76f3..097da5900 100644 --- a/etcdctl/ctlv3/command/defrag_command.go +++ b/etcdctl/ctlv3/command/defrag_command.go @@ -20,7 +20,7 @@ import ( "path/filepath" "time" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/spf13/cobra" ) diff --git a/etcdctl/ctlv3/command/make_mirror_command.go b/etcdctl/ctlv3/command/make_mirror_command.go index 8afa479d4..030e5580d 100644 --- a/etcdctl/ctlv3/command/make_mirror_command.go +++ b/etcdctl/ctlv3/command/make_mirror_command.go @@ -25,7 +25,7 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/mirror" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/spf13/cobra" ) diff --git a/etcdctl/ctlv3/command/migrate_command.go b/etcdctl/ctlv3/command/migrate_command.go index f7db0beac..6b185e14f 100644 --- a/etcdctl/ctlv3/command/migrate_command.go +++ b/etcdctl/ctlv3/command/migrate_command.go @@ -30,11 +30,11 @@ import ( "github.com/coreos/etcd/etcdserver/api" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/internal/raftsnap" "github.com/coreos/etcd/internal/store" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/pbutil" "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft/raftpb" diff --git a/etcdctl/ctlv3/command/printer_fields.go b/etcdctl/ctlv3/command/printer_fields.go index 7351aa739..e8dbe3da2 100644 --- a/etcdctl/ctlv3/command/printer_fields.go +++ b/etcdctl/ctlv3/command/printer_fields.go @@ -19,7 +19,7 @@ import ( v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - spb "github.com/coreos/etcd/mvcc/mvccpb" + spb "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/snapshot" ) diff --git a/etcdctl/ctlv3/command/printer_protobuf.go b/etcdctl/ctlv3/command/printer_protobuf.go index c5109c5c2..3557331b7 100644 --- a/etcdctl/ctlv3/command/printer_protobuf.go +++ b/etcdctl/ctlv3/command/printer_protobuf.go @@ -20,7 +20,7 @@ import ( v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - mvccpb "github.com/coreos/etcd/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/internal/mvcc/mvccpb" ) type pbPrinter struct{ printer } diff --git a/etcdctl/ctlv3/command/util.go b/etcdctl/ctlv3/command/util.go index addd023db..8c94a2df9 100644 --- a/etcdctl/ctlv3/command/util.go +++ b/etcdctl/ctlv3/command/util.go @@ -20,7 +20,7 @@ import ( "fmt" "regexp" - pb "github.com/coreos/etcd/mvcc/mvccpb" + pb "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/spf13/cobra" ) diff --git a/etcdserver/api/v2v3/store.go b/etcdserver/api/v2v3/store.go index 558506546..8a33a15ad 100644 --- a/etcdserver/api/v2v3/store.go +++ b/etcdserver/api/v2v3/store.go @@ -24,8 +24,8 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" etcdErr "github.com/coreos/etcd/error" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/internal/store" - "github.com/coreos/etcd/mvcc/mvccpb" ) // store implements the Store interface for V2 using diff --git a/etcdserver/api/v3election/v3electionpb/v3election.pb.go b/etcdserver/api/v3election/v3electionpb/v3election.pb.go index e298e4521..4033b0dc5 100644 --- a/etcdserver/api/v3election/v3electionpb/v3election.pb.go +++ b/etcdserver/api/v3election/v3electionpb/v3election.pb.go @@ -31,7 +31,7 @@ import ( etcdserverpb "github.com/coreos/etcd/etcdserver/etcdserverpb" - mvccpb "github.com/coreos/etcd/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/internal/mvcc/mvccpb" context "golang.org/x/net/context" diff --git a/etcdserver/api/v3rpc/maintenance.go b/etcdserver/api/v3rpc/maintenance.go index 79fcf354a..18ed30a59 100644 --- a/etcdserver/api/v3rpc/maintenance.go +++ b/etcdserver/api/v3rpc/maintenance.go @@ -23,8 +23,8 @@ import ( "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft" "github.com/coreos/etcd/version" diff --git a/etcdserver/api/v3rpc/util.go b/etcdserver/api/v3rpc/util.go index 79c3559ad..bd092b3a1 100644 --- a/etcdserver/api/v3rpc/util.go +++ b/etcdserver/api/v3rpc/util.go @@ -23,7 +23,7 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/etcdserver/membership" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/internal/mvcc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/etcdserver/api/v3rpc/util_test.go b/etcdserver/api/v3rpc/util_test.go index 8890b1d4f..ddc0858e2 100644 --- a/etcdserver/api/v3rpc/util_test.go +++ b/etcdserver/api/v3rpc/util_test.go @@ -20,7 +20,7 @@ import ( "testing" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" - "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/internal/mvcc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/etcdserver/api/v3rpc/watch.go b/etcdserver/api/v3rpc/watch.go index 0d5a4c2fd..d8e05ee50 100644 --- a/etcdserver/api/v3rpc/watch.go +++ b/etcdserver/api/v3rpc/watch.go @@ -24,8 +24,8 @@ import ( "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) type watchServer struct { diff --git a/etcdserver/apply.go b/etcdserver/apply.go index 5cc1c6963..a79099294 100644 --- a/etcdserver/apply.go +++ b/etcdserver/apply.go @@ -23,8 +23,8 @@ import ( "github.com/coreos/etcd/auth" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/types" "github.com/gogo/protobuf/proto" diff --git a/etcdserver/apply_auth.go b/etcdserver/apply_auth.go index b2ecc2221..d95385af3 100644 --- a/etcdserver/apply_auth.go +++ b/etcdserver/apply_auth.go @@ -20,7 +20,7 @@ import ( "github.com/coreos/etcd/auth" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/internal/mvcc" ) type authApplierV3 struct { diff --git a/etcdserver/backend.go b/etcdserver/backend.go index 2351b15ac..f6af4cbbe 100644 --- a/etcdserver/backend.go +++ b/etcdserver/backend.go @@ -20,9 +20,9 @@ import ( "time" "github.com/coreos/etcd/internal/lease" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/internal/raftsnap" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/raft/raftpb" ) diff --git a/etcdserver/corrupt.go b/etcdserver/corrupt.go index d998ec590..acd57a656 100644 --- a/etcdserver/corrupt.go +++ b/etcdserver/corrupt.go @@ -22,7 +22,7 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/internal/mvcc" "github.com/coreos/etcd/pkg/types" ) diff --git a/etcdserver/etcdserverpb/rpc.pb.go b/etcdserver/etcdserverpb/rpc.pb.go index 4074511c9..d0e59ca05 100644 --- a/etcdserver/etcdserverpb/rpc.pb.go +++ b/etcdserver/etcdserverpb/rpc.pb.go @@ -12,7 +12,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" - mvccpb "github.com/coreos/etcd/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/internal/mvcc/mvccpb" authpb "github.com/coreos/etcd/auth/authpb" diff --git a/etcdserver/membership/cluster.go b/etcdserver/membership/cluster.go index 4aa939675..84a8ffe79 100644 --- a/etcdserver/membership/cluster.go +++ b/etcdserver/membership/cluster.go @@ -27,8 +27,8 @@ import ( "sync" "time" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/internal/store" - "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/netutil" "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft" diff --git a/etcdserver/membership/store.go b/etcdserver/membership/store.go index 5e878a484..62e881364 100644 --- a/etcdserver/membership/store.go +++ b/etcdserver/membership/store.go @@ -19,8 +19,8 @@ import ( "fmt" "path" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/internal/store" - "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/types" "github.com/coreos/go-semver/semver" diff --git a/etcdserver/server.go b/etcdserver/server.go index 0f075eb7c..87aeed658 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -40,10 +40,10 @@ import ( "github.com/coreos/etcd/internal/discovery" "github.com/coreos/etcd/internal/lease" "github.com/coreos/etcd/internal/lease/leasehttp" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/internal/raftsnap" "github.com/coreos/etcd/internal/store" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/fileutil" "github.com/coreos/etcd/pkg/idutil" "github.com/coreos/etcd/pkg/pbutil" diff --git a/etcdserver/server_test.go b/etcdserver/server_test.go index dc0bba891..3c51dcc51 100644 --- a/etcdserver/server_test.go +++ b/etcdserver/server_test.go @@ -29,10 +29,10 @@ import ( pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/etcdserver/membership" "github.com/coreos/etcd/internal/lease" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/internal/raftsnap" "github.com/coreos/etcd/internal/store" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/fileutil" "github.com/coreos/etcd/pkg/idutil" "github.com/coreos/etcd/pkg/mock/mockstorage" diff --git a/etcdserver/snapshot_merge.go b/etcdserver/snapshot_merge.go index b238b4c55..20894e811 100644 --- a/etcdserver/snapshot_merge.go +++ b/etcdserver/snapshot_merge.go @@ -17,8 +17,8 @@ package etcdserver import ( "io" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/internal/raftsnap" - "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/raft/raftpb" ) diff --git a/etcdserver/v3_server.go b/etcdserver/v3_server.go index 059e5f6f9..a66897099 100644 --- a/etcdserver/v3_server.go +++ b/etcdserver/v3_server.go @@ -25,7 +25,7 @@ import ( "github.com/coreos/etcd/etcdserver/membership" "github.com/coreos/etcd/internal/lease" "github.com/coreos/etcd/internal/lease/leasehttp" - "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/internal/mvcc" "github.com/coreos/etcd/raft" "github.com/gogo/protobuf/proto" diff --git a/integration/v3_alarm_test.go b/integration/v3_alarm_test.go index 0dbaf6b7f..6a1fe0a92 100644 --- a/integration/v3_alarm_test.go +++ b/integration/v3_alarm_test.go @@ -24,8 +24,8 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/integration/v3_lease_test.go b/integration/v3_lease_test.go index 7ec2d3c76..85e5c2f77 100644 --- a/integration/v3_lease_test.go +++ b/integration/v3_lease_test.go @@ -22,7 +22,7 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" "google.golang.org/grpc/metadata" diff --git a/integration/v3_lock_test.go b/integration/v3_lock_test.go index 889a6ef1f..c9b00b7c1 100644 --- a/integration/v3_lock_test.go +++ b/integration/v3_lock_test.go @@ -24,7 +24,7 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" "github.com/coreos/etcd/contrib/recipes" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/integration/v3_watch_test.go b/integration/v3_watch_test.go index c91f4df65..b6d7cfe67 100644 --- a/integration/v3_watch_test.go +++ b/integration/v3_watch_test.go @@ -26,7 +26,7 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/internal/alarm/alarms.go b/internal/alarm/alarms.go index 4f0ebe93f..58da77715 100644 --- a/internal/alarm/alarms.go +++ b/internal/alarm/alarms.go @@ -19,7 +19,7 @@ import ( "sync" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/pkg/types" "github.com/coreos/pkg/capnslog" ) diff --git a/internal/compactor/periodic.go b/internal/compactor/periodic.go index 447352ec3..c2ebbe8d2 100644 --- a/internal/compactor/periodic.go +++ b/internal/compactor/periodic.go @@ -20,7 +20,7 @@ import ( "time" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/internal/mvcc" "github.com/jonboulle/clockwork" ) diff --git a/internal/compactor/revision.go b/internal/compactor/revision.go index 4a8761412..54561e9ab 100644 --- a/internal/compactor/revision.go +++ b/internal/compactor/revision.go @@ -19,7 +19,7 @@ import ( "sync" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/internal/mvcc" "github.com/jonboulle/clockwork" ) diff --git a/internal/lease/leasehttp/http_test.go b/internal/lease/leasehttp/http_test.go index a83953989..29b603554 100644 --- a/internal/lease/leasehttp/http_test.go +++ b/internal/lease/leasehttp/http_test.go @@ -24,7 +24,7 @@ import ( "time" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" ) func TestRenewHTTP(t *testing.T) { diff --git a/internal/lease/lessor.go b/internal/lease/lessor.go index 513458997..cdb60be19 100644 --- a/internal/lease/lessor.go +++ b/internal/lease/lessor.go @@ -23,7 +23,7 @@ import ( "time" "github.com/coreos/etcd/internal/lease/leasepb" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" ) // NoLease is a special LeaseID representing the absence of a lease. diff --git a/internal/lease/lessor_test.go b/internal/lease/lessor_test.go index 3f6a5ce50..3c6b9d181 100644 --- a/internal/lease/lessor_test.go +++ b/internal/lease/lessor_test.go @@ -25,7 +25,7 @@ import ( "testing" "time" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" ) const ( diff --git a/mvcc/backend/backend.go b/internal/mvcc/backend/backend.go similarity index 100% rename from mvcc/backend/backend.go rename to internal/mvcc/backend/backend.go diff --git a/mvcc/backend/backend_bench_test.go b/internal/mvcc/backend/backend_bench_test.go similarity index 100% rename from mvcc/backend/backend_bench_test.go rename to internal/mvcc/backend/backend_bench_test.go diff --git a/mvcc/backend/backend_test.go b/internal/mvcc/backend/backend_test.go similarity index 100% rename from mvcc/backend/backend_test.go rename to internal/mvcc/backend/backend_test.go diff --git a/mvcc/backend/batch_tx.go b/internal/mvcc/backend/batch_tx.go similarity index 100% rename from mvcc/backend/batch_tx.go rename to internal/mvcc/backend/batch_tx.go diff --git a/mvcc/backend/batch_tx_test.go b/internal/mvcc/backend/batch_tx_test.go similarity index 100% rename from mvcc/backend/batch_tx_test.go rename to internal/mvcc/backend/batch_tx_test.go diff --git a/mvcc/backend/config_default.go b/internal/mvcc/backend/config_default.go similarity index 100% rename from mvcc/backend/config_default.go rename to internal/mvcc/backend/config_default.go diff --git a/mvcc/backend/config_linux.go b/internal/mvcc/backend/config_linux.go similarity index 100% rename from mvcc/backend/config_linux.go rename to internal/mvcc/backend/config_linux.go diff --git a/mvcc/backend/config_windows.go b/internal/mvcc/backend/config_windows.go similarity index 100% rename from mvcc/backend/config_windows.go rename to internal/mvcc/backend/config_windows.go diff --git a/mvcc/backend/doc.go b/internal/mvcc/backend/doc.go similarity index 100% rename from mvcc/backend/doc.go rename to internal/mvcc/backend/doc.go diff --git a/mvcc/backend/metrics.go b/internal/mvcc/backend/metrics.go similarity index 100% rename from mvcc/backend/metrics.go rename to internal/mvcc/backend/metrics.go diff --git a/mvcc/backend/read_tx.go b/internal/mvcc/backend/read_tx.go similarity index 100% rename from mvcc/backend/read_tx.go rename to internal/mvcc/backend/read_tx.go diff --git a/mvcc/backend/tx_buffer.go b/internal/mvcc/backend/tx_buffer.go similarity index 100% rename from mvcc/backend/tx_buffer.go rename to internal/mvcc/backend/tx_buffer.go diff --git a/mvcc/doc.go b/internal/mvcc/doc.go similarity index 100% rename from mvcc/doc.go rename to internal/mvcc/doc.go diff --git a/mvcc/index.go b/internal/mvcc/index.go similarity index 100% rename from mvcc/index.go rename to internal/mvcc/index.go diff --git a/mvcc/index_test.go b/internal/mvcc/index_test.go similarity index 100% rename from mvcc/index_test.go rename to internal/mvcc/index_test.go diff --git a/mvcc/key_index.go b/internal/mvcc/key_index.go similarity index 100% rename from mvcc/key_index.go rename to internal/mvcc/key_index.go diff --git a/mvcc/key_index_test.go b/internal/mvcc/key_index_test.go similarity index 100% rename from mvcc/key_index_test.go rename to internal/mvcc/key_index_test.go diff --git a/mvcc/kv.go b/internal/mvcc/kv.go similarity index 98% rename from mvcc/kv.go rename to internal/mvcc/kv.go index b149eb522..e8cb1dec3 100644 --- a/mvcc/kv.go +++ b/internal/mvcc/kv.go @@ -16,8 +16,8 @@ package mvcc import ( "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) type RangeOptions struct { diff --git a/mvcc/kv_test.go b/internal/mvcc/kv_test.go similarity index 99% rename from mvcc/kv_test.go rename to internal/mvcc/kv_test.go index 07289741d..e4185f47b 100644 --- a/mvcc/kv_test.go +++ b/internal/mvcc/kv_test.go @@ -22,8 +22,8 @@ import ( "time" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" "github.com/prometheus/client_golang/prometheus" diff --git a/mvcc/kv_view.go b/internal/mvcc/kv_view.go similarity index 100% rename from mvcc/kv_view.go rename to internal/mvcc/kv_view.go diff --git a/mvcc/kvstore.go b/internal/mvcc/kvstore.go similarity index 99% rename from mvcc/kvstore.go rename to internal/mvcc/kvstore.go index 4c022d249..54bb2047b 100644 --- a/mvcc/kvstore.go +++ b/internal/mvcc/kvstore.go @@ -25,8 +25,8 @@ import ( "time" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/schedule" "github.com/coreos/pkg/capnslog" ) diff --git a/mvcc/kvstore_bench_test.go b/internal/mvcc/kvstore_bench_test.go similarity index 98% rename from mvcc/kvstore_bench_test.go rename to internal/mvcc/kvstore_bench_test.go index af4310c1f..0d4381a03 100644 --- a/mvcc/kvstore_bench_test.go +++ b/internal/mvcc/kvstore_bench_test.go @@ -19,7 +19,7 @@ import ( "testing" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" ) type fakeConsistentIndex uint64 diff --git a/mvcc/kvstore_compaction.go b/internal/mvcc/kvstore_compaction.go similarity index 100% rename from mvcc/kvstore_compaction.go rename to internal/mvcc/kvstore_compaction.go diff --git a/mvcc/kvstore_compaction_test.go b/internal/mvcc/kvstore_compaction_test.go similarity index 98% rename from mvcc/kvstore_compaction_test.go rename to internal/mvcc/kvstore_compaction_test.go index fc04ef4ed..1dc9e08c3 100644 --- a/mvcc/kvstore_compaction_test.go +++ b/internal/mvcc/kvstore_compaction_test.go @@ -21,7 +21,7 @@ import ( "time" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" ) func TestScheduleCompaction(t *testing.T) { diff --git a/mvcc/kvstore_test.go b/internal/mvcc/kvstore_test.go similarity index 99% rename from mvcc/kvstore_test.go rename to internal/mvcc/kvstore_test.go index f315282e5..91950ec76 100644 --- a/mvcc/kvstore_test.go +++ b/internal/mvcc/kvstore_test.go @@ -27,8 +27,8 @@ import ( "time" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/schedule" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/mvcc/kvstore_txn.go b/internal/mvcc/kvstore_txn.go similarity index 98% rename from mvcc/kvstore_txn.go rename to internal/mvcc/kvstore_txn.go index 7122d64ae..6d839a1a5 100644 --- a/mvcc/kvstore_txn.go +++ b/internal/mvcc/kvstore_txn.go @@ -16,8 +16,8 @@ package mvcc import ( "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) type storeTxnRead struct { diff --git a/mvcc/metrics.go b/internal/mvcc/metrics.go similarity index 100% rename from mvcc/metrics.go rename to internal/mvcc/metrics.go diff --git a/mvcc/metrics_txn.go b/internal/mvcc/metrics_txn.go similarity index 100% rename from mvcc/metrics_txn.go rename to internal/mvcc/metrics_txn.go diff --git a/mvcc/mvccpb/kv.pb.go b/internal/mvcc/mvccpb/kv.pb.go similarity index 100% rename from mvcc/mvccpb/kv.pb.go rename to internal/mvcc/mvccpb/kv.pb.go diff --git a/mvcc/mvccpb/kv.proto b/internal/mvcc/mvccpb/kv.proto similarity index 100% rename from mvcc/mvccpb/kv.proto rename to internal/mvcc/mvccpb/kv.proto diff --git a/mvcc/revision.go b/internal/mvcc/revision.go similarity index 100% rename from mvcc/revision.go rename to internal/mvcc/revision.go diff --git a/mvcc/revision_test.go b/internal/mvcc/revision_test.go similarity index 100% rename from mvcc/revision_test.go rename to internal/mvcc/revision_test.go diff --git a/mvcc/util.go b/internal/mvcc/util.go similarity index 93% rename from mvcc/util.go rename to internal/mvcc/util.go index 8a0df0bfc..1eb050051 100644 --- a/mvcc/util.go +++ b/internal/mvcc/util.go @@ -17,8 +17,8 @@ package mvcc import ( "encoding/binary" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) func UpdateConsistentIndex(be backend.Backend, index uint64) { diff --git a/mvcc/watchable_store.go b/internal/mvcc/watchable_store.go similarity index 99% rename from mvcc/watchable_store.go rename to internal/mvcc/watchable_store.go index ee0d86727..34d4d3265 100644 --- a/mvcc/watchable_store.go +++ b/internal/mvcc/watchable_store.go @@ -19,8 +19,8 @@ import ( "time" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) // non-const so modifiable by tests diff --git a/mvcc/watchable_store_bench_test.go b/internal/mvcc/watchable_store_bench_test.go similarity index 99% rename from mvcc/watchable_store_bench_test.go rename to internal/mvcc/watchable_store_bench_test.go index bda6e8c6c..65807ab42 100644 --- a/mvcc/watchable_store_bench_test.go +++ b/internal/mvcc/watchable_store_bench_test.go @@ -20,7 +20,7 @@ import ( "testing" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" ) func BenchmarkWatchableStorePut(b *testing.B) { diff --git a/mvcc/watchable_store_test.go b/internal/mvcc/watchable_store_test.go similarity index 99% rename from mvcc/watchable_store_test.go rename to internal/mvcc/watchable_store_test.go index 16bbffc35..aa0e29954 100644 --- a/mvcc/watchable_store_test.go +++ b/internal/mvcc/watchable_store_test.go @@ -24,8 +24,8 @@ import ( "time" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) func TestWatch(t *testing.T) { diff --git a/mvcc/watchable_store_txn.go b/internal/mvcc/watchable_store_txn.go similarity index 96% rename from mvcc/watchable_store_txn.go rename to internal/mvcc/watchable_store_txn.go index 5c5bfda13..9c66e5335 100644 --- a/mvcc/watchable_store_txn.go +++ b/internal/mvcc/watchable_store_txn.go @@ -14,9 +14,7 @@ package mvcc -import ( - "github.com/coreos/etcd/mvcc/mvccpb" -) +import "github.com/coreos/etcd/internal/mvcc/mvccpb" func (tw *watchableStoreTxnWrite) End() { changes := tw.Changes() diff --git a/mvcc/watcher.go b/internal/mvcc/watcher.go similarity index 99% rename from mvcc/watcher.go rename to internal/mvcc/watcher.go index 886b87d5a..9b79aa806 100644 --- a/mvcc/watcher.go +++ b/internal/mvcc/watcher.go @@ -19,7 +19,7 @@ import ( "errors" "sync" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) // AutoWatchID is the watcher ID passed in WatchStream.Watch when no diff --git a/mvcc/watcher_bench_test.go b/internal/mvcc/watcher_bench_test.go similarity index 95% rename from mvcc/watcher_bench_test.go rename to internal/mvcc/watcher_bench_test.go index a41781781..72264cb0c 100644 --- a/mvcc/watcher_bench_test.go +++ b/internal/mvcc/watcher_bench_test.go @@ -19,7 +19,7 @@ import ( "testing" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/backend" ) func BenchmarkKVWatcherMemoryUsage(b *testing.B) { diff --git a/mvcc/watcher_group.go b/internal/mvcc/watcher_group.go similarity index 99% rename from mvcc/watcher_group.go rename to internal/mvcc/watcher_group.go index 6ef1d0ce8..d56daff0e 100644 --- a/mvcc/watcher_group.go +++ b/internal/mvcc/watcher_group.go @@ -17,7 +17,7 @@ package mvcc import ( "math" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/pkg/adt" ) diff --git a/mvcc/watcher_test.go b/internal/mvcc/watcher_test.go similarity index 99% rename from mvcc/watcher_test.go rename to internal/mvcc/watcher_test.go index d9a11cb82..c4005b061 100644 --- a/mvcc/watcher_test.go +++ b/internal/mvcc/watcher_test.go @@ -23,8 +23,8 @@ import ( "time" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) // TestWatcherWatchID tests that each watcher provides unique watchID, diff --git a/proxy/grpcproxy/watcher.go b/proxy/grpcproxy/watcher.go index 1a497462f..0c56e56f6 100644 --- a/proxy/grpcproxy/watcher.go +++ b/proxy/grpcproxy/watcher.go @@ -19,8 +19,8 @@ import ( "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) type watchRange struct { diff --git a/snapshot/v3_snapshot.go b/snapshot/v3_snapshot.go index 26cb83a04..7988989d8 100644 --- a/snapshot/v3_snapshot.go +++ b/snapshot/v3_snapshot.go @@ -31,10 +31,10 @@ import ( "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/etcdserver/membership" "github.com/coreos/etcd/internal/lease" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/internal/raftsnap" "github.com/coreos/etcd/internal/store" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/fileutil" "github.com/coreos/etcd/pkg/logger" "github.com/coreos/etcd/pkg/types" diff --git a/tools/benchmark/cmd/mvcc.go b/tools/benchmark/cmd/mvcc.go index dac23a259..72b3f3754 100644 --- a/tools/benchmark/cmd/mvcc.go +++ b/tools/benchmark/cmd/mvcc.go @@ -19,8 +19,8 @@ import ( "time" "github.com/coreos/etcd/internal/lease" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" "github.com/spf13/cobra" ) diff --git a/tools/etcd-dump-db/backend.go b/tools/etcd-dump-db/backend.go index d40ce093a..986adf04d 100644 --- a/tools/etcd-dump-db/backend.go +++ b/tools/etcd-dump-db/backend.go @@ -21,9 +21,9 @@ import ( bolt "github.com/coreos/bbolt" "github.com/coreos/etcd/internal/lease/leasepb" - "github.com/coreos/etcd/mvcc" - "github.com/coreos/etcd/mvcc/backend" - "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/internal/mvcc/mvccpb" ) func snapDir(dataDir string) string {