From 8a518b01c4782840b4de66b118e0468ea703475d Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Mon, 26 Feb 2018 11:12:45 -0800 Subject: [PATCH] *: revert "internal/mvcc" change Signed-off-by: Gyuho Lee --- alarm/alarms.go | 3 ++- 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 +- compactor/periodic.go | 2 +- compactor/revision.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 +- lease/leasehttp/http_test.go | 2 +- lease/lessor.go | 2 +- lease/lessor_test.go | 2 +- {internal/mvcc => mvcc}/backend/backend.go | 0 {internal/mvcc => mvcc}/backend/backend_bench_test.go | 0 {internal/mvcc => mvcc}/backend/backend_test.go | 0 {internal/mvcc => mvcc}/backend/batch_tx.go | 0 {internal/mvcc => mvcc}/backend/batch_tx_test.go | 0 {internal/mvcc => mvcc}/backend/config_default.go | 0 {internal/mvcc => mvcc}/backend/config_linux.go | 0 {internal/mvcc => mvcc}/backend/config_windows.go | 0 {internal/mvcc => mvcc}/backend/doc.go | 0 {internal/mvcc => mvcc}/backend/metrics.go | 0 {internal/mvcc => mvcc}/backend/read_tx.go | 0 {internal/mvcc => mvcc}/backend/tx_buffer.go | 0 {internal/mvcc => mvcc}/doc.go | 0 {internal/mvcc => mvcc}/index.go | 0 {internal/mvcc => mvcc}/index_test.go | 0 {internal/mvcc => mvcc}/key_index.go | 0 {internal/mvcc => mvcc}/key_index_test.go | 0 {internal/mvcc => mvcc}/kv.go | 4 ++-- {internal/mvcc => mvcc}/kv_test.go | 4 ++-- {internal/mvcc => mvcc}/kv_view.go | 0 {internal/mvcc => mvcc}/kvstore.go | 4 ++-- {internal/mvcc => mvcc}/kvstore_bench_test.go | 2 +- {internal/mvcc => mvcc}/kvstore_compaction.go | 0 {internal/mvcc => mvcc}/kvstore_compaction_test.go | 2 +- {internal/mvcc => mvcc}/kvstore_test.go | 4 ++-- {internal/mvcc => mvcc}/kvstore_txn.go | 4 ++-- {internal/mvcc => mvcc}/metrics.go | 0 {internal/mvcc => mvcc}/metrics_txn.go | 0 {internal/mvcc => mvcc}/mvccpb/kv.pb.go | 0 {internal/mvcc => mvcc}/mvccpb/kv.proto | 0 {internal/mvcc => mvcc}/revision.go | 0 {internal/mvcc => mvcc}/revision_test.go | 0 {internal/mvcc => mvcc}/util.go | 4 ++-- {internal/mvcc => mvcc}/watchable_store.go | 4 ++-- {internal/mvcc => mvcc}/watchable_store_bench_test.go | 2 +- {internal/mvcc => mvcc}/watchable_store_test.go | 4 ++-- {internal/mvcc => mvcc}/watchable_store_txn.go | 2 +- {internal/mvcc => mvcc}/watcher.go | 2 +- {internal/mvcc => mvcc}/watcher_bench_test.go | 2 +- {internal/mvcc => mvcc}/watcher_group.go | 2 +- {internal/mvcc => 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, 100 insertions(+), 99 deletions(-) rename {internal/mvcc => mvcc}/backend/backend.go (100%) rename {internal/mvcc => mvcc}/backend/backend_bench_test.go (100%) rename {internal/mvcc => mvcc}/backend/backend_test.go (100%) rename {internal/mvcc => mvcc}/backend/batch_tx.go (100%) rename {internal/mvcc => mvcc}/backend/batch_tx_test.go (100%) rename {internal/mvcc => mvcc}/backend/config_default.go (100%) rename {internal/mvcc => mvcc}/backend/config_linux.go (100%) rename {internal/mvcc => mvcc}/backend/config_windows.go (100%) rename {internal/mvcc => mvcc}/backend/doc.go (100%) rename {internal/mvcc => mvcc}/backend/metrics.go (100%) rename {internal/mvcc => mvcc}/backend/read_tx.go (100%) rename {internal/mvcc => mvcc}/backend/tx_buffer.go (100%) rename {internal/mvcc => mvcc}/doc.go (100%) rename {internal/mvcc => mvcc}/index.go (100%) rename {internal/mvcc => mvcc}/index_test.go (100%) rename {internal/mvcc => mvcc}/key_index.go (100%) rename {internal/mvcc => mvcc}/key_index_test.go (100%) rename {internal/mvcc => mvcc}/kv.go (98%) rename {internal/mvcc => mvcc}/kv_test.go (99%) rename {internal/mvcc => mvcc}/kv_view.go (100%) rename {internal/mvcc => mvcc}/kvstore.go (99%) rename {internal/mvcc => mvcc}/kvstore_bench_test.go (98%) rename {internal/mvcc => mvcc}/kvstore_compaction.go (100%) rename {internal/mvcc => mvcc}/kvstore_compaction_test.go (98%) rename {internal/mvcc => mvcc}/kvstore_test.go (99%) rename {internal/mvcc => mvcc}/kvstore_txn.go (98%) rename {internal/mvcc => mvcc}/metrics.go (100%) rename {internal/mvcc => mvcc}/metrics_txn.go (100%) rename {internal/mvcc => mvcc}/mvccpb/kv.pb.go (100%) rename {internal/mvcc => mvcc}/mvccpb/kv.proto (100%) rename {internal/mvcc => mvcc}/revision.go (100%) rename {internal/mvcc => mvcc}/revision_test.go (100%) rename {internal/mvcc => mvcc}/util.go (93%) rename {internal/mvcc => mvcc}/watchable_store.go (99%) rename {internal/mvcc => mvcc}/watchable_store_bench_test.go (99%) rename {internal/mvcc => mvcc}/watchable_store_test.go (99%) rename {internal/mvcc => mvcc}/watchable_store_txn.go (96%) rename {internal/mvcc => mvcc}/watcher.go (99%) rename {internal/mvcc => mvcc}/watcher_bench_test.go (95%) rename {internal/mvcc => mvcc}/watcher_group.go (99%) rename {internal/mvcc => mvcc}/watcher_test.go (99%) diff --git a/alarm/alarms.go b/alarm/alarms.go index 58da77715..4fd79999a 100644 --- a/alarm/alarms.go +++ b/alarm/alarms.go @@ -19,8 +19,9 @@ import ( "sync" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/types" + "github.com/coreos/pkg/capnslog" ) diff --git a/auth/range_perm_cache.go b/auth/range_perm_cache.go index 62acdf26d..691b65ba3 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/internal/mvcc/backend" + "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/adt" ) diff --git a/auth/store.go b/auth/store.go index e93560896..d379ffa8e 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/internal/mvcc/backend" + "github.com/coreos/etcd/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 739d8fcde..b4eaa5e74 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/internal/mvcc/backend" + "github.com/coreos/etcd/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 84156a374..e18a0ed4a 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" ) var ( diff --git a/clientv3/concurrency/key.go b/clientv3/concurrency/key.go index 4d11ffef6..4b6e399bd 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/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 81630c53e..66de753cd 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/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 87bc75f54..d25c4e9ba 100644 --- a/clientv3/integration/maintenance_test.go +++ b/clientv3/integration/maintenance_test.go @@ -26,9 +26,9 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/integration" - "github.com/coreos/etcd/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/clientv3/integration/mirror_test.go b/clientv3/integration/mirror_test.go index 9a2bac522..01bfef10a 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/clientv3/integration/namespace_test.go b/clientv3/integration/namespace_test.go index f884b17b1..b952d333d 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/clientv3/integration/watch_test.go b/clientv3/integration/watch_test.go index a3559faa7..f9ac47b4a 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/internal/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/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 5df1d842a..77a1d06c8 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" ) const revokeBackoff = 2 * time.Second diff --git a/clientv3/leasing/kv.go b/clientv3/leasing/kv.go index 026320700..051a8fceb 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/clientv3/watch.go b/clientv3/watch.go index 9452d0d92..312845cbe 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/internal/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/mvcc/mvccpb" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/clientv3/watch_test.go b/clientv3/watch_test.go index 1edb4a843..8d3380522 100644 --- a/clientv3/watch_test.go +++ b/clientv3/watch_test.go @@ -17,7 +17,7 @@ package clientv3 import ( "testing" - "github.com/coreos/etcd/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" ) func TestEvent(t *testing.T) { diff --git a/compactor/periodic.go b/compactor/periodic.go index c2ebbe8d2..447352ec3 100644 --- a/compactor/periodic.go +++ b/compactor/periodic.go @@ -20,7 +20,7 @@ import ( "time" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/mvcc" "github.com/jonboulle/clockwork" ) diff --git a/compactor/revision.go b/compactor/revision.go index 54561e9ab..4a8761412 100644 --- a/compactor/revision.go +++ b/compactor/revision.go @@ -19,7 +19,7 @@ import ( "sync" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/internal/mvcc" + "github.com/coreos/etcd/mvcc" "github.com/jonboulle/clockwork" ) diff --git a/contrib/recipes/barrier.go b/contrib/recipes/barrier.go index 7dc18cdbd..6e9281721 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/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 79b23a828..111b0b40c 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/internal/mvcc/mvccpb" + spb "github.com/coreos/etcd/mvcc/mvccpb" ) var ( diff --git a/contrib/recipes/double_barrier.go b/contrib/recipes/double_barrier.go index 27ff76ab3..93cc61b4f 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/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 8be0db74f..2378ce2f8 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" ) // PriorityQueue implements a multi-reader, multi-writer distributed queue. diff --git a/contrib/recipes/queue.go b/contrib/recipes/queue.go index 33a8f31b3..5d0423a42 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" ) // Queue implements a multi-reader, multi-writer distributed queue. diff --git a/contrib/recipes/rwmutex.go b/contrib/recipes/rwmutex.go index 436ee0917..1213b7e42 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" ) type RWMutex struct { diff --git a/contrib/recipes/watch.go b/contrib/recipes/watch.go index 7226a8ea7..536787227 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/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 aa6020e4f..a2bbb4c42 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" bolt "github.com/coreos/bbolt" ) diff --git a/etcdctl/ctlv3/command/defrag_command.go b/etcdctl/ctlv3/command/defrag_command.go index 097da5900..a7e6f76f3 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/internal/mvcc/backend" + "github.com/coreos/etcd/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 030e5580d..8afa479d4 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" "github.com/spf13/cobra" ) diff --git a/etcdctl/ctlv3/command/migrate_command.go b/etcdctl/ctlv3/command/migrate_command.go index b392bbd52..4b08df35e 100644 --- a/etcdctl/ctlv3/command/migrate_command.go +++ b/etcdctl/ctlv3/command/migrate_command.go @@ -31,9 +31,9 @@ import ( pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/etcdserver/membership" "github.com/coreos/etcd/etcdserver/v2store" - "github.com/coreos/etcd/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" + "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 e8dbe3da2..7351aa739 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/internal/mvcc/mvccpb" + spb "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/snapshot" ) diff --git a/etcdctl/ctlv3/command/printer_protobuf.go b/etcdctl/ctlv3/command/printer_protobuf.go index 3557331b7..c5109c5c2 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/internal/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/mvcc/mvccpb" ) type pbPrinter struct{ printer } diff --git a/etcdctl/ctlv3/command/util.go b/etcdctl/ctlv3/command/util.go index c47466677..92256bd59 100644 --- a/etcdctl/ctlv3/command/util.go +++ b/etcdctl/ctlv3/command/util.go @@ -26,7 +26,7 @@ import ( "time" v3 "github.com/coreos/etcd/clientv3" - pb "github.com/coreos/etcd/internal/mvcc/mvccpb" + pb "github.com/coreos/etcd/mvcc/mvccpb" "github.com/spf13/cobra" ) diff --git a/etcdserver/api/v2v3/store.go b/etcdserver/api/v2v3/store.go index cb034895e..900dc1f69 100644 --- a/etcdserver/api/v2v3/store.go +++ b/etcdserver/api/v2v3/store.go @@ -25,7 +25,7 @@ import ( "github.com/coreos/etcd/clientv3/concurrency" etcdErr "github.com/coreos/etcd/error" "github.com/coreos/etcd/etcdserver/v2store" - "github.com/coreos/etcd/internal/mvcc/mvccpb" + "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 b097f7401..bddd73137 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/internal/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/mvcc/mvccpb" context "golang.org/x/net/context" diff --git a/etcdserver/api/v3rpc/maintenance.go b/etcdserver/api/v3rpc/maintenance.go index dc40bedca..0f86bc0b8 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/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/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 e645918d2..328135b1e 100644 --- a/etcdserver/api/v3rpc/util.go +++ b/etcdserver/api/v3rpc/util.go @@ -22,8 +22,8 @@ import ( "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/etcdserver/membership" - "github.com/coreos/etcd/internal/mvcc" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/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 ddc0858e2..8890b1d4f 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/internal/mvcc" + "github.com/coreos/etcd/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 45ce6bff0..25a5c9e7c 100644 --- a/etcdserver/api/v3rpc/watch.go +++ b/etcdserver/api/v3rpc/watch.go @@ -25,8 +25,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/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/mvccpb" ) type watchServer struct { diff --git a/etcdserver/apply.go b/etcdserver/apply.go index 9ca815e95..5be2ec0e7 100644 --- a/etcdserver/apply.go +++ b/etcdserver/apply.go @@ -22,9 +22,9 @@ import ( "github.com/coreos/etcd/auth" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/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 c46eaefd8..ec9391435 100644 --- a/etcdserver/apply_auth.go +++ b/etcdserver/apply_auth.go @@ -19,8 +19,8 @@ import ( "github.com/coreos/etcd/auth" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/internal/mvcc" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc" ) type authApplierV3 struct { diff --git a/etcdserver/backend.go b/etcdserver/backend.go index 3b1030444..97e780980 100644 --- a/etcdserver/backend.go +++ b/etcdserver/backend.go @@ -19,9 +19,9 @@ import ( "os" "time" - "github.com/coreos/etcd/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/raft/raftpb" "github.com/coreos/etcd/raftsnap" ) diff --git a/etcdserver/corrupt.go b/etcdserver/corrupt.go index acd57a656..d998ec590 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/internal/mvcc" + "github.com/coreos/etcd/mvcc" "github.com/coreos/etcd/pkg/types" ) diff --git a/etcdserver/etcdserverpb/rpc.pb.go b/etcdserver/etcdserverpb/rpc.pb.go index d36060ec1..f25e9a561 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/internal/mvcc/mvccpb" + mvccpb "github.com/coreos/etcd/mvcc/mvccpb" authpb "github.com/coreos/etcd/internal/auth/authpb" diff --git a/etcdserver/membership/cluster.go b/etcdserver/membership/cluster.go index 55337b859..dccfa17f4 100644 --- a/etcdserver/membership/cluster.go +++ b/etcdserver/membership/cluster.go @@ -28,7 +28,7 @@ import ( "time" "github.com/coreos/etcd/etcdserver/v2store" - "github.com/coreos/etcd/internal/mvcc/backend" + "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 1740c4534..3106aca37 100644 --- a/etcdserver/membership/store.go +++ b/etcdserver/membership/store.go @@ -20,7 +20,7 @@ import ( "path" "github.com/coreos/etcd/etcdserver/v2store" - "github.com/coreos/etcd/internal/mvcc/backend" + "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 134e4ab75..473594a81 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -39,10 +39,10 @@ import ( "github.com/coreos/etcd/etcdserver/membership" "github.com/coreos/etcd/etcdserver/stats" "github.com/coreos/etcd/etcdserver/v2store" - "github.com/coreos/etcd/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" "github.com/coreos/etcd/lease/leasehttp" + "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 9facd7ecf..e1bab47d0 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/etcdserver/v2store" - "github.com/coreos/etcd/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/internal/store" "github.com/coreos/etcd/lease" + "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 05d6f4f78..7fe852dda 100644 --- a/etcdserver/snapshot_merge.go +++ b/etcdserver/snapshot_merge.go @@ -17,7 +17,7 @@ package etcdserver import ( "io" - "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/raft/raftpb" "github.com/coreos/etcd/raftsnap" ) diff --git a/etcdserver/v3_server.go b/etcdserver/v3_server.go index 975383b66..b3f773274 100644 --- a/etcdserver/v3_server.go +++ b/etcdserver/v3_server.go @@ -23,9 +23,9 @@ import ( "github.com/coreos/etcd/auth" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/etcdserver/membership" - "github.com/coreos/etcd/internal/mvcc" "github.com/coreos/etcd/lease" "github.com/coreos/etcd/lease/leasehttp" + "github.com/coreos/etcd/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 6a1fe0a92..0dbaf6b7f 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/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/integration/v3_lease_test.go b/integration/v3_lease_test.go index 85e5c2f77..7ec2d3c76 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/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 c9b00b7c1..889a6ef1f 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/integration/v3_watch_test.go b/integration/v3_watch_test.go index b6d7cfe67..c91f4df65 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/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/lease/leasehttp/http_test.go b/lease/leasehttp/http_test.go index ba545b272..367cd8e64 100644 --- a/lease/leasehttp/http_test.go +++ b/lease/leasehttp/http_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" ) func TestRenewHTTP(t *testing.T) { diff --git a/lease/lessor.go b/lease/lessor.go index d3dda9bdc..29a012416 100644 --- a/lease/lessor.go +++ b/lease/lessor.go @@ -22,8 +22,8 @@ import ( "sync" "time" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease/leasepb" + "github.com/coreos/etcd/mvcc/backend" ) // NoLease is a special LeaseID representing the absence of a lease. diff --git a/lease/lessor_test.go b/lease/lessor_test.go index 3c6b9d181..3f6a5ce50 100644 --- a/lease/lessor_test.go +++ b/lease/lessor_test.go @@ -25,7 +25,7 @@ import ( "testing" "time" - "github.com/coreos/etcd/internal/mvcc/backend" + "github.com/coreos/etcd/mvcc/backend" ) const ( diff --git a/internal/mvcc/backend/backend.go b/mvcc/backend/backend.go similarity index 100% rename from internal/mvcc/backend/backend.go rename to mvcc/backend/backend.go diff --git a/internal/mvcc/backend/backend_bench_test.go b/mvcc/backend/backend_bench_test.go similarity index 100% rename from internal/mvcc/backend/backend_bench_test.go rename to mvcc/backend/backend_bench_test.go diff --git a/internal/mvcc/backend/backend_test.go b/mvcc/backend/backend_test.go similarity index 100% rename from internal/mvcc/backend/backend_test.go rename to mvcc/backend/backend_test.go diff --git a/internal/mvcc/backend/batch_tx.go b/mvcc/backend/batch_tx.go similarity index 100% rename from internal/mvcc/backend/batch_tx.go rename to mvcc/backend/batch_tx.go diff --git a/internal/mvcc/backend/batch_tx_test.go b/mvcc/backend/batch_tx_test.go similarity index 100% rename from internal/mvcc/backend/batch_tx_test.go rename to mvcc/backend/batch_tx_test.go diff --git a/internal/mvcc/backend/config_default.go b/mvcc/backend/config_default.go similarity index 100% rename from internal/mvcc/backend/config_default.go rename to mvcc/backend/config_default.go diff --git a/internal/mvcc/backend/config_linux.go b/mvcc/backend/config_linux.go similarity index 100% rename from internal/mvcc/backend/config_linux.go rename to mvcc/backend/config_linux.go diff --git a/internal/mvcc/backend/config_windows.go b/mvcc/backend/config_windows.go similarity index 100% rename from internal/mvcc/backend/config_windows.go rename to mvcc/backend/config_windows.go diff --git a/internal/mvcc/backend/doc.go b/mvcc/backend/doc.go similarity index 100% rename from internal/mvcc/backend/doc.go rename to mvcc/backend/doc.go diff --git a/internal/mvcc/backend/metrics.go b/mvcc/backend/metrics.go similarity index 100% rename from internal/mvcc/backend/metrics.go rename to mvcc/backend/metrics.go diff --git a/internal/mvcc/backend/read_tx.go b/mvcc/backend/read_tx.go similarity index 100% rename from internal/mvcc/backend/read_tx.go rename to mvcc/backend/read_tx.go diff --git a/internal/mvcc/backend/tx_buffer.go b/mvcc/backend/tx_buffer.go similarity index 100% rename from internal/mvcc/backend/tx_buffer.go rename to mvcc/backend/tx_buffer.go diff --git a/internal/mvcc/doc.go b/mvcc/doc.go similarity index 100% rename from internal/mvcc/doc.go rename to mvcc/doc.go diff --git a/internal/mvcc/index.go b/mvcc/index.go similarity index 100% rename from internal/mvcc/index.go rename to mvcc/index.go diff --git a/internal/mvcc/index_test.go b/mvcc/index_test.go similarity index 100% rename from internal/mvcc/index_test.go rename to mvcc/index_test.go diff --git a/internal/mvcc/key_index.go b/mvcc/key_index.go similarity index 100% rename from internal/mvcc/key_index.go rename to mvcc/key_index.go diff --git a/internal/mvcc/key_index_test.go b/mvcc/key_index_test.go similarity index 100% rename from internal/mvcc/key_index_test.go rename to mvcc/key_index_test.go diff --git a/internal/mvcc/kv.go b/mvcc/kv.go similarity index 98% rename from internal/mvcc/kv.go rename to mvcc/kv.go index ae5f5fa66..2dad3ad8e 100644 --- a/internal/mvcc/kv.go +++ b/mvcc/kv.go @@ -15,9 +15,9 @@ package mvcc import ( - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" ) type RangeOptions struct { diff --git a/internal/mvcc/kv_test.go b/mvcc/kv_test.go similarity index 99% rename from internal/mvcc/kv_test.go rename to mvcc/kv_test.go index 4a8295470..2d7dc01ff 100644 --- a/internal/mvcc/kv_test.go +++ b/mvcc/kv_test.go @@ -21,9 +21,9 @@ import ( "testing" "time" - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/mvcc/kv_view.go b/mvcc/kv_view.go similarity index 100% rename from internal/mvcc/kv_view.go rename to mvcc/kv_view.go diff --git a/internal/mvcc/kvstore.go b/mvcc/kvstore.go similarity index 99% rename from internal/mvcc/kvstore.go rename to mvcc/kvstore.go index 6fd438205..73f3c4c83 100644 --- a/internal/mvcc/kvstore.go +++ b/mvcc/kvstore.go @@ -24,9 +24,9 @@ import ( "sync/atomic" "time" - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/schedule" "github.com/coreos/pkg/capnslog" diff --git a/internal/mvcc/kvstore_bench_test.go b/mvcc/kvstore_bench_test.go similarity index 98% rename from internal/mvcc/kvstore_bench_test.go rename to mvcc/kvstore_bench_test.go index 6551944b0..a64a3c5a5 100644 --- a/internal/mvcc/kvstore_bench_test.go +++ b/mvcc/kvstore_bench_test.go @@ -18,8 +18,8 @@ import ( "sync/atomic" "testing" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" ) type fakeConsistentIndex uint64 diff --git a/internal/mvcc/kvstore_compaction.go b/mvcc/kvstore_compaction.go similarity index 100% rename from internal/mvcc/kvstore_compaction.go rename to mvcc/kvstore_compaction.go diff --git a/internal/mvcc/kvstore_compaction_test.go b/mvcc/kvstore_compaction_test.go similarity index 98% rename from internal/mvcc/kvstore_compaction_test.go rename to mvcc/kvstore_compaction_test.go index e315602eb..b2ee570f9 100644 --- a/internal/mvcc/kvstore_compaction_test.go +++ b/mvcc/kvstore_compaction_test.go @@ -20,8 +20,8 @@ import ( "testing" "time" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" ) func TestScheduleCompaction(t *testing.T) { diff --git a/internal/mvcc/kvstore_test.go b/mvcc/kvstore_test.go similarity index 99% rename from internal/mvcc/kvstore_test.go rename to mvcc/kvstore_test.go index df7216923..923a4d5b6 100644 --- a/internal/mvcc/kvstore_test.go +++ b/mvcc/kvstore_test.go @@ -26,9 +26,9 @@ import ( "testing" "time" - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/schedule" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/internal/mvcc/kvstore_txn.go b/mvcc/kvstore_txn.go similarity index 98% rename from internal/mvcc/kvstore_txn.go rename to mvcc/kvstore_txn.go index 33939800b..8896fb86d 100644 --- a/internal/mvcc/kvstore_txn.go +++ b/mvcc/kvstore_txn.go @@ -15,9 +15,9 @@ package mvcc import ( - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" ) type storeTxnRead struct { diff --git a/internal/mvcc/metrics.go b/mvcc/metrics.go similarity index 100% rename from internal/mvcc/metrics.go rename to mvcc/metrics.go diff --git a/internal/mvcc/metrics_txn.go b/mvcc/metrics_txn.go similarity index 100% rename from internal/mvcc/metrics_txn.go rename to mvcc/metrics_txn.go diff --git a/internal/mvcc/mvccpb/kv.pb.go b/mvcc/mvccpb/kv.pb.go similarity index 100% rename from internal/mvcc/mvccpb/kv.pb.go rename to mvcc/mvccpb/kv.pb.go diff --git a/internal/mvcc/mvccpb/kv.proto b/mvcc/mvccpb/kv.proto similarity index 100% rename from internal/mvcc/mvccpb/kv.proto rename to mvcc/mvccpb/kv.proto diff --git a/internal/mvcc/revision.go b/mvcc/revision.go similarity index 100% rename from internal/mvcc/revision.go rename to mvcc/revision.go diff --git a/internal/mvcc/revision_test.go b/mvcc/revision_test.go similarity index 100% rename from internal/mvcc/revision_test.go rename to mvcc/revision_test.go diff --git a/internal/mvcc/util.go b/mvcc/util.go similarity index 93% rename from internal/mvcc/util.go rename to mvcc/util.go index 1eb050051..8a0df0bfc 100644 --- a/internal/mvcc/util.go +++ b/mvcc/util.go @@ -17,8 +17,8 @@ package mvcc import ( "encoding/binary" - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" ) func UpdateConsistentIndex(be backend.Backend, index uint64) { diff --git a/internal/mvcc/watchable_store.go b/mvcc/watchable_store.go similarity index 99% rename from internal/mvcc/watchable_store.go rename to mvcc/watchable_store.go index d93fb6c9b..14bb14ce2 100644 --- a/internal/mvcc/watchable_store.go +++ b/mvcc/watchable_store.go @@ -18,9 +18,9 @@ import ( "sync" "time" - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" ) // non-const so modifiable by tests diff --git a/internal/mvcc/watchable_store_bench_test.go b/mvcc/watchable_store_bench_test.go similarity index 99% rename from internal/mvcc/watchable_store_bench_test.go rename to mvcc/watchable_store_bench_test.go index 5f7e39738..198fea6bb 100644 --- a/internal/mvcc/watchable_store_bench_test.go +++ b/mvcc/watchable_store_bench_test.go @@ -19,8 +19,8 @@ import ( "os" "testing" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" ) func BenchmarkWatchableStorePut(b *testing.B) { diff --git a/internal/mvcc/watchable_store_test.go b/mvcc/watchable_store_test.go similarity index 99% rename from internal/mvcc/watchable_store_test.go rename to mvcc/watchable_store_test.go index 00ea0c084..28762fad4 100644 --- a/internal/mvcc/watchable_store_test.go +++ b/mvcc/watchable_store_test.go @@ -23,9 +23,9 @@ import ( "testing" "time" - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" ) func TestWatch(t *testing.T) { diff --git a/internal/mvcc/watchable_store_txn.go b/mvcc/watchable_store_txn.go similarity index 96% rename from internal/mvcc/watchable_store_txn.go rename to mvcc/watchable_store_txn.go index 9c66e5335..bc8eb645a 100644 --- a/internal/mvcc/watchable_store_txn.go +++ b/mvcc/watchable_store_txn.go @@ -14,7 +14,7 @@ package mvcc -import "github.com/coreos/etcd/internal/mvcc/mvccpb" +import "github.com/coreos/etcd/mvcc/mvccpb" func (tw *watchableStoreTxnWrite) End() { changes := tw.Changes() diff --git a/internal/mvcc/watcher.go b/mvcc/watcher.go similarity index 99% rename from internal/mvcc/watcher.go rename to mvcc/watcher.go index 9b79aa806..886b87d5a 100644 --- a/internal/mvcc/watcher.go +++ b/mvcc/watcher.go @@ -19,7 +19,7 @@ import ( "errors" "sync" - "github.com/coreos/etcd/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" ) // AutoWatchID is the watcher ID passed in WatchStream.Watch when no diff --git a/internal/mvcc/watcher_bench_test.go b/mvcc/watcher_bench_test.go similarity index 95% rename from internal/mvcc/watcher_bench_test.go rename to mvcc/watcher_bench_test.go index 99ff29f1b..86cbea7df 100644 --- a/internal/mvcc/watcher_bench_test.go +++ b/mvcc/watcher_bench_test.go @@ -18,8 +18,8 @@ import ( "fmt" "testing" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" ) func BenchmarkKVWatcherMemoryUsage(b *testing.B) { diff --git a/internal/mvcc/watcher_group.go b/mvcc/watcher_group.go similarity index 99% rename from internal/mvcc/watcher_group.go rename to mvcc/watcher_group.go index d56daff0e..6ef1d0ce8 100644 --- a/internal/mvcc/watcher_group.go +++ b/mvcc/watcher_group.go @@ -17,7 +17,7 @@ package mvcc import ( "math" - "github.com/coreos/etcd/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/adt" ) diff --git a/internal/mvcc/watcher_test.go b/mvcc/watcher_test.go similarity index 99% rename from internal/mvcc/watcher_test.go rename to mvcc/watcher_test.go index 3a9c56303..ad5b54d7a 100644 --- a/internal/mvcc/watcher_test.go +++ b/mvcc/watcher_test.go @@ -22,9 +22,9 @@ import ( "testing" "time" - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" ) // TestWatcherWatchID tests that each watcher provides unique watchID, diff --git a/proxy/grpcproxy/watcher.go b/proxy/grpcproxy/watcher.go index 0c56e56f6..1a497462f 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/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/mvccpb" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/mvccpb" ) type watchRange struct { diff --git a/snapshot/v3_snapshot.go b/snapshot/v3_snapshot.go index 417d855e1..a410a4453 100644 --- a/snapshot/v3_snapshot.go +++ b/snapshot/v3_snapshot.go @@ -31,9 +31,9 @@ import ( "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/etcdserver/membership" "github.com/coreos/etcd/etcdserver/v2store" - "github.com/coreos/etcd/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" + "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 fc666dc32..3da8679b1 100644 --- a/tools/benchmark/cmd/mvcc.go +++ b/tools/benchmark/cmd/mvcc.go @@ -18,9 +18,9 @@ import ( "os" "time" - "github.com/coreos/etcd/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/backend" "github.com/spf13/cobra" ) diff --git a/tools/etcd-dump-db/backend.go b/tools/etcd-dump-db/backend.go index e03caa6c9..3b3eb1e54 100644 --- a/tools/etcd-dump-db/backend.go +++ b/tools/etcd-dump-db/backend.go @@ -19,10 +19,10 @@ import ( "fmt" "path/filepath" - "github.com/coreos/etcd/internal/mvcc" - "github.com/coreos/etcd/internal/mvcc/backend" - "github.com/coreos/etcd/internal/mvcc/mvccpb" "github.com/coreos/etcd/lease/leasepb" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" bolt "github.com/coreos/bbolt" )