Browse Source

Merge pull request #9274 from gyuho/revert

*: revert "internal" package changes
Gyuho Lee 7 years ago
parent
commit
5b9741e804
100 changed files with 797 additions and 793 deletions
  1. 2 2
      Documentation/dev-guide/api_concurrency_reference_v3.md
  2. 8 8
      Documentation/dev-guide/api_reference_v3.md
  3. 2 1
      alarm/alarms.go
  4. 0 0
      auth/authpb/auth.pb.go
  5. 0 0
      auth/authpb/auth.proto
  6. 0 0
      auth/doc.go
  7. 0 0
      auth/jwt.go
  8. 2 2
      auth/jwt_test.go
  9. 2 2
      auth/range_perm_cache.go
  10. 1 1
      auth/range_perm_cache_test.go
  11. 0 0
      auth/simple_token.go
  12. 0 0
      auth/simple_token_test.go
  13. 2 2
      auth/store.go
  14. 2 2
      auth/store_test.go
  15. 1 1
      client/client.go
  16. 1 1
      client/client_test.go
  17. 1 1
      clientv3/auth.go
  18. 1 1
      clientv3/concurrency/election.go
  19. 1 1
      clientv3/concurrency/key.go
  20. 1 1
      clientv3/integration/kv_test.go
  21. 3 3
      clientv3/integration/maintenance_test.go
  22. 1 1
      clientv3/integration/mirror_test.go
  23. 1 1
      clientv3/integration/namespace_test.go
  24. 1 1
      clientv3/integration/watch_test.go
  25. 1 1
      clientv3/leasing/cache.go
  26. 1 1
      clientv3/leasing/kv.go
  27. 2 1
      clientv3/main_test.go
  28. 1 1
      clientv3/watch.go
  29. 1 1
      clientv3/watch_test.go
  30. 0 0
      compactor/compactor.go
  31. 0 0
      compactor/compactor_test.go
  32. 0 0
      compactor/doc.go
  33. 1 1
      compactor/periodic.go
  34. 0 0
      compactor/periodic_test.go
  35. 1 1
      compactor/revision.go
  36. 0 0
      compactor/revision_test.go
  37. 1 1
      contrib/raftexample/kvstore.go
  38. 1 1
      contrib/raftexample/raft.go
  39. 1 1
      contrib/recipes/barrier.go
  40. 1 1
      contrib/recipes/client.go
  41. 1 1
      contrib/recipes/double_barrier.go
  42. 1 1
      contrib/recipes/priority_queue.go
  43. 1 1
      contrib/recipes/queue.go
  44. 1 1
      contrib/recipes/rwmutex.go
  45. 1 1
      contrib/recipes/watch.go
  46. 0 0
      discovery/discovery.go
  47. 0 0
      discovery/discovery_test.go
  48. 1 1
      e2e/ctl_v3_test.go
  49. 1 1
      e2e/etcd_corrupt_test.go
  50. 1 1
      e2e/etcd_release_upgrade_test.go
  51. 1 1
      e2e/metrics_test.go
  52. 1 1
      embed/config.go
  53. 1 1
      embed/serve_test.go
  54. 1 1
      etcdctl/ctlv2/command/backup_command.go
  55. 1 1
      etcdctl/ctlv2/ctl.go
  56. 1 1
      etcdctl/ctlv3/command/defrag_command.go
  57. 1 1
      etcdctl/ctlv3/command/make_mirror_command.go
  58. 12 11
      etcdctl/ctlv3/command/migrate_command.go
  59. 1 1
      etcdctl/ctlv3/command/printer_fields.go
  60. 1 1
      etcdctl/ctlv3/command/printer_protobuf.go
  61. 1 1
      etcdctl/ctlv3/command/util.go
  62. 1 1
      etcdctl/ctlv3/command/version_command.go
  63. 1 1
      etcdctl/ctlv3/help.go
  64. 1 1
      etcdmain/config.go
  65. 2 2
      etcdmain/etcd.go
  66. 1 1
      etcdserver/api/capability.go
  67. 3 3
      etcdserver/api/etcdhttp/base.go
  68. 1 1
      etcdserver/api/etcdhttp/peer.go
  69. 1 1
      etcdserver/api/etcdhttp/version_test.go
  70. 46 46
      etcdserver/api/v2http/client.go
  71. 115 115
      etcdserver/api/v2http/client_test.go
  72. 3 3
      etcdserver/api/v2http/http_test.go
  73. 3 3
      etcdserver/api/v2http/metrics.go
  74. 84 84
      etcdserver/api/v2v3/store.go
  75. 9 9
      etcdserver/api/v2v3/watcher.go
  76. 35 35
      etcdserver/api/v3election/v3electionpb/v3election.pb.go
  77. 1 1
      etcdserver/api/v3election/v3electionpb/v3election.proto
  78. 1 1
      etcdserver/api/v3rpc/lease.go
  79. 4 4
      etcdserver/api/v3rpc/maintenance.go
  80. 3 3
      etcdserver/api/v3rpc/util.go
  81. 1 1
      etcdserver/api/v3rpc/util_test.go
  82. 3 3
      etcdserver/api/v3rpc/watch.go
  83. 4 4
      etcdserver/apply.go
  84. 3 3
      etcdserver/apply_auth.go
  85. 9 8
      etcdserver/apply_v2.go
  86. 4 4
      etcdserver/backend.go
  87. 1 1
      etcdserver/cluster_util.go
  88. 1 1
      etcdserver/cluster_util_test.go
  89. 1 1
      etcdserver/corrupt.go
  90. 226 226
      etcdserver/etcdserverpb/rpc.pb.go
  91. 2 2
      etcdserver/etcdserverpb/rpc.proto
  92. 21 21
      etcdserver/membership/cluster.go
  93. 12 12
      etcdserver/membership/cluster_test.go
  94. 3 3
      etcdserver/membership/errors.go
  95. 13 13
      etcdserver/membership/store.go
  96. 1 1
      etcdserver/metrics.go
  97. 21 21
      etcdserver/server.go
  98. 77 77
      etcdserver/server_test.go
  99. 3 3
      etcdserver/snapshot_merge.go
  100. 1 1
      etcdserver/storage.go

+ 2 - 2
Documentation/dev-guide/api_concurrency_reference_v3.md

@@ -143,7 +143,7 @@ The election service exposes client-side election facilities as a gRPC interface
 
 
 
 
 
 
-##### message `Event` (internal/mvcc/mvccpb/kv.proto)
+##### message `Event` (mvcc/mvccpb/kv.proto)
 
 
 | Field | Description | Type |
 | Field | Description | Type |
 | ----- | ----------- | ---- |
 | ----- | ----------- | ---- |
@@ -153,7 +153,7 @@ The election service exposes client-side election facilities as a gRPC interface
 
 
 
 
 
 
-##### message `KeyValue` (internal/mvcc/mvccpb/kv.proto)
+##### message `KeyValue` (mvcc/mvccpb/kv.proto)
 
 
 | Field | Description | Type |
 | Field | Description | Type |
 | ----- | ----------- | ---- |
 | ----- | ----------- | ---- |

+ 8 - 8
Documentation/dev-guide/api_reference_v3.md

@@ -863,7 +863,7 @@ From google paxosdb paper: Our implementation hinges around a powerful primitive
 
 
 
 
 
 
-##### message `Event` (internal/mvcc/mvccpb/kv.proto)
+##### message `Event` (mvcc/mvccpb/kv.proto)
 
 
 | Field | Description | Type |
 | Field | Description | Type |
 | ----- | ----------- | ---- |
 | ----- | ----------- | ---- |
@@ -873,7 +873,7 @@ From google paxosdb paper: Our implementation hinges around a powerful primitive
 
 
 
 
 
 
-##### message `KeyValue` (internal/mvcc/mvccpb/kv.proto)
+##### message `KeyValue` (mvcc/mvccpb/kv.proto)
 
 
 | Field | Description | Type |
 | Field | Description | Type |
 | ----- | ----------- | ---- |
 | ----- | ----------- | ---- |
@@ -886,7 +886,7 @@ From google paxosdb paper: Our implementation hinges around a powerful primitive
 
 
 
 
 
 
-##### message `Lease` (internal/lease/leasepb/lease.proto)
+##### message `Lease` (lease/leasepb/lease.proto)
 
 
 | Field | Description | Type |
 | Field | Description | Type |
 | ----- | ----------- | ---- |
 | ----- | ----------- | ---- |
@@ -895,7 +895,7 @@ From google paxosdb paper: Our implementation hinges around a powerful primitive
 
 
 
 
 
 
-##### message `LeaseInternalRequest` (internal/lease/leasepb/lease.proto)
+##### message `LeaseInternalRequest` (lease/leasepb/lease.proto)
 
 
 | Field | Description | Type |
 | Field | Description | Type |
 | ----- | ----------- | ---- |
 | ----- | ----------- | ---- |
@@ -903,7 +903,7 @@ From google paxosdb paper: Our implementation hinges around a powerful primitive
 
 
 
 
 
 
-##### message `LeaseInternalResponse` (internal/lease/leasepb/lease.proto)
+##### message `LeaseInternalResponse` (lease/leasepb/lease.proto)
 
 
 | Field | Description | Type |
 | Field | Description | Type |
 | ----- | ----------- | ---- |
 | ----- | ----------- | ---- |
@@ -911,7 +911,7 @@ From google paxosdb paper: Our implementation hinges around a powerful primitive
 
 
 
 
 
 
-##### message `Permission` (internal/auth/authpb/auth.proto)
+##### message `Permission` (auth/authpb/auth.proto)
 
 
 Permission is a single entity
 Permission is a single entity
 
 
@@ -923,7 +923,7 @@ Permission is a single entity
 
 
 
 
 
 
-##### message `Role` (internal/auth/authpb/auth.proto)
+##### message `Role` (auth/authpb/auth.proto)
 
 
 Role is a single entry in the bucket authRoles
 Role is a single entry in the bucket authRoles
 
 
@@ -934,7 +934,7 @@ Role is a single entry in the bucket authRoles
 
 
 
 
 
 
-##### message `User` (internal/auth/authpb/auth.proto)
+##### message `User` (auth/authpb/auth.proto)
 
 
 User is a single entry in the bucket authUsers
 User is a single entry in the bucket authUsers
 
 

+ 2 - 1
internal/alarm/alarms.go → alarm/alarms.go

@@ -19,8 +19,9 @@ import (
 	"sync"
 	"sync"
 
 
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	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/etcd/pkg/types"
+
 	"github.com/coreos/pkg/capnslog"
 	"github.com/coreos/pkg/capnslog"
 )
 )
 
 

+ 0 - 0
internal/auth/authpb/auth.pb.go → auth/authpb/auth.pb.go


+ 0 - 0
internal/auth/authpb/auth.proto → auth/authpb/auth.proto


+ 0 - 0
internal/auth/doc.go → auth/doc.go


+ 0 - 0
internal/auth/jwt.go → auth/jwt.go


+ 2 - 2
internal/auth/jwt_test.go → auth/jwt_test.go

@@ -20,8 +20,8 @@ import (
 )
 )
 
 
 const (
 const (
-	jwtPubKey  = "../../integration/fixtures/server.crt"
-	jwtPrivKey = "../../integration/fixtures/server.key.insecure"
+	jwtPubKey  = "../integration/fixtures/server.crt"
+	jwtPrivKey = "../integration/fixtures/server.key.insecure"
 )
 )
 
 
 func TestJWTInfo(t *testing.T) {
 func TestJWTInfo(t *testing.T) {

+ 2 - 2
internal/auth/range_perm_cache.go → auth/range_perm_cache.go

@@ -15,8 +15,8 @@
 package auth
 package auth
 
 
 import (
 import (
-	"github.com/coreos/etcd/internal/auth/authpb"
-	"github.com/coreos/etcd/internal/mvcc/backend"
+	"github.com/coreos/etcd/auth/authpb"
+	"github.com/coreos/etcd/mvcc/backend"
 	"github.com/coreos/etcd/pkg/adt"
 	"github.com/coreos/etcd/pkg/adt"
 )
 )
 
 

+ 1 - 1
internal/auth/range_perm_cache_test.go → auth/range_perm_cache_test.go

@@ -17,7 +17,7 @@ package auth
 import (
 import (
 	"testing"
 	"testing"
 
 
-	"github.com/coreos/etcd/internal/auth/authpb"
+	"github.com/coreos/etcd/auth/authpb"
 	"github.com/coreos/etcd/pkg/adt"
 	"github.com/coreos/etcd/pkg/adt"
 )
 )
 
 

+ 0 - 0
internal/auth/simple_token.go → auth/simple_token.go


+ 0 - 0
internal/auth/simple_token_test.go → auth/simple_token_test.go


+ 2 - 2
internal/auth/store.go → auth/store.go

@@ -24,9 +24,9 @@ import (
 	"sync"
 	"sync"
 	"sync/atomic"
 	"sync/atomic"
 
 
+	"github.com/coreos/etcd/auth/authpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/auth/authpb"
-	"github.com/coreos/etcd/internal/mvcc/backend"
+	"github.com/coreos/etcd/mvcc/backend"
 
 
 	"github.com/coreos/pkg/capnslog"
 	"github.com/coreos/pkg/capnslog"
 	"golang.org/x/crypto/bcrypt"
 	"golang.org/x/crypto/bcrypt"

+ 2 - 2
internal/auth/store_test.go → auth/store_test.go

@@ -24,9 +24,9 @@ import (
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
+	"github.com/coreos/etcd/auth/authpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/auth/authpb"
-	"github.com/coreos/etcd/internal/mvcc/backend"
+	"github.com/coreos/etcd/mvcc/backend"
 
 
 	"golang.org/x/crypto/bcrypt"
 	"golang.org/x/crypto/bcrypt"
 	"google.golang.org/grpc/metadata"
 	"google.golang.org/grpc/metadata"

+ 1 - 1
client/client.go

@@ -29,7 +29,7 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"time"
 
 
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/version"
 )
 )
 
 
 var (
 var (

+ 1 - 1
client/client_test.go

@@ -29,8 +29,8 @@ import (
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
-	"github.com/coreos/etcd/internal/version"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/testutil"
+	"github.com/coreos/etcd/version"
 )
 )
 
 
 type actionAssertingHTTPClient struct {
 type actionAssertingHTTPClient struct {

+ 1 - 1
clientv3/auth.go

@@ -19,8 +19,8 @@ import (
 	"fmt"
 	"fmt"
 	"strings"
 	"strings"
 
 
+	"github.com/coreos/etcd/auth/authpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/auth/authpb"
 
 
 	"google.golang.org/grpc"
 	"google.golang.org/grpc"
 )
 )

+ 1 - 1
clientv3/concurrency/election.go

@@ -21,7 +21,7 @@ import (
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	v3 "github.com/coreos/etcd/clientv3"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/mvcc/mvccpb"
+	"github.com/coreos/etcd/mvcc/mvccpb"
 )
 )
 
 
 var (
 var (

+ 1 - 1
clientv3/concurrency/key.go

@@ -20,7 +20,7 @@ import (
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	v3 "github.com/coreos/etcd/clientv3"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	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 {
 func waitDelete(ctx context.Context, client *v3.Client, key string, rev int64) error {

+ 1 - 1
clientv3/integration/kv_test.go

@@ -26,7 +26,7 @@ import (
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/integration"
 	"github.com/coreos/etcd/integration"
-	"github.com/coreos/etcd/internal/mvcc/mvccpb"
+	"github.com/coreos/etcd/mvcc/mvccpb"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/testutil"
 
 
 	"google.golang.org/grpc"
 	"google.golang.org/grpc"

+ 3 - 3
clientv3/integration/maintenance_test.go

@@ -26,9 +26,9 @@ import (
 
 
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/integration"
 	"github.com/coreos/etcd/integration"
-	"github.com/coreos/etcd/internal/lease"
-	"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"
 	"github.com/coreos/etcd/pkg/testutil"
 )
 )
 
 

+ 1 - 1
clientv3/integration/mirror_test.go

@@ -24,7 +24,7 @@ import (
 
 
 	"github.com/coreos/etcd/clientv3/mirror"
 	"github.com/coreos/etcd/clientv3/mirror"
 	"github.com/coreos/etcd/integration"
 	"github.com/coreos/etcd/integration"
-	"github.com/coreos/etcd/internal/mvcc/mvccpb"
+	"github.com/coreos/etcd/mvcc/mvccpb"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/testutil"
 )
 )
 
 

+ 1 - 1
clientv3/integration/namespace_test.go

@@ -22,7 +22,7 @@ import (
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3/namespace"
 	"github.com/coreos/etcd/clientv3/namespace"
 	"github.com/coreos/etcd/integration"
 	"github.com/coreos/etcd/integration"
-	"github.com/coreos/etcd/internal/mvcc/mvccpb"
+	"github.com/coreos/etcd/mvcc/mvccpb"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/testutil"
 )
 )
 
 

+ 1 - 1
clientv3/integration/watch_test.go

@@ -27,7 +27,7 @@ import (
 	"github.com/coreos/etcd/etcdserver/api/v3rpc"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/integration"
 	"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"
 	"github.com/coreos/etcd/pkg/testutil"
 
 
 	"google.golang.org/grpc"
 	"google.golang.org/grpc"

+ 1 - 1
clientv3/leasing/cache.go

@@ -22,7 +22,7 @@ import (
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	v3 "github.com/coreos/etcd/clientv3"
 	v3pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	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
 const revokeBackoff = 2 * time.Second

+ 1 - 1
clientv3/leasing/kv.go

@@ -24,7 +24,7 @@ import (
 	"github.com/coreos/etcd/clientv3/concurrency"
 	"github.com/coreos/etcd/clientv3/concurrency"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	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/codes"
 	"google.golang.org/grpc/status"
 	"google.golang.org/grpc/status"

+ 2 - 1
clientv3/main_test.go

@@ -22,9 +22,10 @@ import (
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
+	"github.com/coreos/etcd/auth"
 	"github.com/coreos/etcd/integration"
 	"github.com/coreos/etcd/integration"
-	"github.com/coreos/etcd/internal/auth"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/testutil"
+
 	"golang.org/x/crypto/bcrypt"
 	"golang.org/x/crypto/bcrypt"
 )
 )
 
 

+ 1 - 1
clientv3/watch.go

@@ -22,7 +22,7 @@ import (
 
 
 	v3rpc "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	v3rpc "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	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"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/codes"

+ 1 - 1
clientv3/watch_test.go

@@ -17,7 +17,7 @@ package clientv3
 import (
 import (
 	"testing"
 	"testing"
 
 
-	"github.com/coreos/etcd/internal/mvcc/mvccpb"
+	"github.com/coreos/etcd/mvcc/mvccpb"
 )
 )
 
 
 func TestEvent(t *testing.T) {
 func TestEvent(t *testing.T) {

+ 0 - 0
internal/compactor/compactor.go → compactor/compactor.go


+ 0 - 0
internal/compactor/compactor_test.go → compactor/compactor_test.go


+ 0 - 0
internal/compactor/doc.go → compactor/doc.go


+ 1 - 1
internal/compactor/periodic.go → compactor/periodic.go

@@ -20,7 +20,7 @@ import (
 	"time"
 	"time"
 
 
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/mvcc"
+	"github.com/coreos/etcd/mvcc"
 
 
 	"github.com/jonboulle/clockwork"
 	"github.com/jonboulle/clockwork"
 )
 )

+ 0 - 0
internal/compactor/periodic_test.go → compactor/periodic_test.go


+ 1 - 1
internal/compactor/revision.go → compactor/revision.go

@@ -19,7 +19,7 @@ import (
 	"sync"
 	"sync"
 
 
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/mvcc"
+	"github.com/coreos/etcd/mvcc"
 
 
 	"github.com/jonboulle/clockwork"
 	"github.com/jonboulle/clockwork"
 )
 )

+ 0 - 0
internal/compactor/revision_test.go → compactor/revision_test.go


+ 1 - 1
contrib/raftexample/kvstore.go

@@ -21,7 +21,7 @@ import (
 	"log"
 	"log"
 	"sync"
 	"sync"
 
 
-	"github.com/coreos/etcd/internal/raftsnap"
+	"github.com/coreos/etcd/raftsnap"
 )
 )
 
 
 // a key-value store backed by raft
 // a key-value store backed by raft

+ 1 - 1
contrib/raftexample/raft.go

@@ -25,12 +25,12 @@ import (
 	"time"
 	"time"
 
 
 	"github.com/coreos/etcd/etcdserver/stats"
 	"github.com/coreos/etcd/etcdserver/stats"
-	"github.com/coreos/etcd/internal/raftsnap"
 	"github.com/coreos/etcd/pkg/fileutil"
 	"github.com/coreos/etcd/pkg/fileutil"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/rafthttp"
 	"github.com/coreos/etcd/rafthttp"
+	"github.com/coreos/etcd/raftsnap"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal/walpb"
 	"github.com/coreos/etcd/wal/walpb"
 )
 )

+ 1 - 1
contrib/recipes/barrier.go

@@ -18,7 +18,7 @@ import (
 	"context"
 	"context"
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	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
 // Barrier creates a key in etcd to block processes, then deletes the key to

+ 1 - 1
contrib/recipes/client.go

@@ -19,7 +19,7 @@ import (
 	"errors"
 	"errors"
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	v3 "github.com/coreos/etcd/clientv3"
-	spb "github.com/coreos/etcd/internal/mvcc/mvccpb"
+	spb "github.com/coreos/etcd/mvcc/mvccpb"
 )
 )
 
 
 var (
 var (

+ 1 - 1
contrib/recipes/double_barrier.go

@@ -19,7 +19,7 @@ import (
 
 
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3/concurrency"
 	"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
 // DoubleBarrier blocks processes on Enter until an expected count enters, then

+ 1 - 1
contrib/recipes/priority_queue.go

@@ -19,7 +19,7 @@ import (
 	"fmt"
 	"fmt"
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	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.
 // PriorityQueue implements a multi-reader, multi-writer distributed queue.

+ 1 - 1
contrib/recipes/queue.go

@@ -18,7 +18,7 @@ import (
 	"context"
 	"context"
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	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.
 // Queue implements a multi-reader, multi-writer distributed queue.

+ 1 - 1
contrib/recipes/rwmutex.go

@@ -19,7 +19,7 @@ import (
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	v3 "github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3/concurrency"
 	"github.com/coreos/etcd/clientv3/concurrency"
-	"github.com/coreos/etcd/internal/mvcc/mvccpb"
+	"github.com/coreos/etcd/mvcc/mvccpb"
 )
 )
 
 
 type RWMutex struct {
 type RWMutex struct {

+ 1 - 1
contrib/recipes/watch.go

@@ -18,7 +18,7 @@ import (
 	"context"
 	"context"
 
 
 	"github.com/coreos/etcd/clientv3"
 	"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.
 // WaitEvents waits on a key until it observes the given events and returns the final one.

+ 0 - 0
internal/discovery/discovery.go → discovery/discovery.go


+ 0 - 0
internal/discovery/discovery_test.go → discovery/discovery_test.go


+ 1 - 1
e2e/ctl_v3_test.go

@@ -21,9 +21,9 @@ import (
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
-	"github.com/coreos/etcd/internal/version"
 	"github.com/coreos/etcd/pkg/flags"
 	"github.com/coreos/etcd/pkg/flags"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/testutil"
+	"github.com/coreos/etcd/version"
 )
 )
 
 
 func TestCtlV3Version(t *testing.T) { testCtl(t, versionTest) }
 func TestCtlV3Version(t *testing.T) { testCtl(t, versionTest) }

+ 1 - 1
e2e/etcd_corrupt_test.go

@@ -24,7 +24,7 @@ import (
 	"time"
 	"time"
 
 
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3"
-	"github.com/coreos/etcd/internal/mvcc/mvccpb"
+	"github.com/coreos/etcd/mvcc/mvccpb"
 
 
 	bolt "github.com/coreos/bbolt"
 	bolt "github.com/coreos/bbolt"
 )
 )

+ 1 - 1
e2e/etcd_release_upgrade_test.go

@@ -21,9 +21,9 @@ import (
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
-	"github.com/coreos/etcd/internal/version"
 	"github.com/coreos/etcd/pkg/fileutil"
 	"github.com/coreos/etcd/pkg/fileutil"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/testutil"
+	"github.com/coreos/etcd/version"
 )
 )
 
 
 // TestReleaseUpgrade ensures that changes to master branch does not affect
 // TestReleaseUpgrade ensures that changes to master branch does not affect

+ 1 - 1
e2e/metrics_test.go

@@ -18,7 +18,7 @@ import (
 	"fmt"
 	"fmt"
 	"testing"
 	"testing"
 
 
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/version"
 )
 )
 
 
 func TestV3MetricsSecure(t *testing.T) {
 func TestV3MetricsSecure(t *testing.T) {

+ 1 - 1
embed/config.go

@@ -26,8 +26,8 @@ import (
 	"strings"
 	"strings"
 	"time"
 	"time"
 
 
+	"github.com/coreos/etcd/compactor"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
-	"github.com/coreos/etcd/internal/compactor"
 	"github.com/coreos/etcd/pkg/cors"
 	"github.com/coreos/etcd/pkg/cors"
 	"github.com/coreos/etcd/pkg/netutil"
 	"github.com/coreos/etcd/pkg/netutil"
 	"github.com/coreos/etcd/pkg/srv"
 	"github.com/coreos/etcd/pkg/srv"

+ 1 - 1
embed/serve_test.go

@@ -19,7 +19,7 @@ import (
 	"os"
 	"os"
 	"testing"
 	"testing"
 
 
-	"github.com/coreos/etcd/internal/auth"
+	"github.com/coreos/etcd/auth"
 )
 )
 
 
 // TestStartEtcdWrongToken ensures that StartEtcd with wrong configs returns with error.
 // TestStartEtcdWrongToken ensures that StartEtcd with wrong configs returns with error.

+ 1 - 1
etcdctl/ctlv2/command/backup_command.go

@@ -25,11 +25,11 @@ import (
 
 
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/membership"
-	"github.com/coreos/etcd/internal/raftsnap"
 	"github.com/coreos/etcd/pkg/fileutil"
 	"github.com/coreos/etcd/pkg/fileutil"
 	"github.com/coreos/etcd/pkg/idutil"
 	"github.com/coreos/etcd/pkg/idutil"
 	"github.com/coreos/etcd/pkg/pbutil"
 	"github.com/coreos/etcd/pkg/pbutil"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
+	"github.com/coreos/etcd/raftsnap"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal/walpb"
 	"github.com/coreos/etcd/wal/walpb"
 
 

+ 1 - 1
etcdctl/ctlv2/ctl.go

@@ -21,7 +21,7 @@ import (
 	"time"
 	"time"
 
 
 	"github.com/coreos/etcd/etcdctl/ctlv2/command"
 	"github.com/coreos/etcd/etcdctl/ctlv2/command"
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/urfave/cli"
 	"github.com/urfave/cli"
 )
 )

+ 1 - 1
etcdctl/ctlv3/command/defrag_command.go

@@ -20,7 +20,7 @@ import (
 	"path/filepath"
 	"path/filepath"
 	"time"
 	"time"
 
 
-	"github.com/coreos/etcd/internal/mvcc/backend"
+	"github.com/coreos/etcd/mvcc/backend"
 	"github.com/spf13/cobra"
 	"github.com/spf13/cobra"
 )
 )
 
 

+ 1 - 1
etcdctl/ctlv3/command/make_mirror_command.go

@@ -25,7 +25,7 @@ import (
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3/mirror"
 	"github.com/coreos/etcd/clientv3/mirror"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"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"
 	"github.com/spf13/cobra"
 )
 )

+ 12 - 11
etcdctl/ctlv3/command/migrate_command.go

@@ -25,21 +25,22 @@ import (
 	"time"
 	"time"
 
 
 	"github.com/coreos/etcd/client"
 	"github.com/coreos/etcd/client"
-	etcdErr "github.com/coreos/etcd/error"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"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/etcdserver/v2error"
+	"github.com/coreos/etcd/etcdserver/v2store"
+	"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/pbutil"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
+	"github.com/coreos/etcd/raftsnap"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal/walpb"
 	"github.com/coreos/etcd/wal/walpb"
+
 	"github.com/gogo/protobuf/proto"
 	"github.com/gogo/protobuf/proto"
 	"github.com/spf13/cobra"
 	"github.com/spf13/cobra"
 )
 )
@@ -124,7 +125,7 @@ func prepareBackend() backend.Backend {
 	return be
 	return be
 }
 }
 
 
-func rebuildStoreV2() (store.Store, uint64) {
+func rebuildStoreV2() (v2store.Store, uint64) {
 	var index uint64
 	var index uint64
 	cl := membership.NewCluster("")
 	cl := membership.NewCluster("")
 
 
@@ -157,7 +158,7 @@ func rebuildStoreV2() (store.Store, uint64) {
 		ExitWithError(ExitError, err)
 		ExitWithError(ExitError, err)
 	}
 	}
 
 
-	st := store.New()
+	st := v2store.New()
 	if snapshot != nil {
 	if snapshot != nil {
 		err := st.Recovery(snapshot.Data)
 		err := st.Recovery(snapshot.Data)
 		if err != nil {
 		if err != nil {
@@ -237,10 +238,10 @@ func applyRequest(req *pb.Request, applyV2 etcdserver.ApplierV2) {
 	}
 	}
 }
 }
 
 
-func writeStore(w io.Writer, st store.Store) uint64 {
+func writeStore(w io.Writer, st v2store.Store) uint64 {
 	all, err := st.Get("/1", true, true)
 	all, err := st.Get("/1", true, true)
 	if err != nil {
 	if err != nil {
-		if eerr, ok := err.(*etcdErr.Error); ok && eerr.ErrorCode == etcdErr.EcodeKeyNotFound {
+		if eerr, ok := err.(*v2error.Error); ok && eerr.ErrorCode == v2error.EcodeKeyNotFound {
 			fmt.Println("no v2 keys to migrate")
 			fmt.Println("no v2 keys to migrate")
 			os.Exit(0)
 			os.Exit(0)
 		}
 		}
@@ -249,7 +250,7 @@ func writeStore(w io.Writer, st store.Store) uint64 {
 	return writeKeys(w, all.Node)
 	return writeKeys(w, all.Node)
 }
 }
 
 
-func writeKeys(w io.Writer, n *store.NodeExtern) uint64 {
+func writeKeys(w io.Writer, n *v2store.NodeExtern) uint64 {
 	maxIndex := n.ModifiedIndex
 	maxIndex := n.ModifiedIndex
 
 
 	nodes := n.Nodes
 	nodes := n.Nodes

+ 1 - 1
etcdctl/ctlv3/command/printer_fields.go

@@ -19,7 +19,7 @@ import (
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	v3 "github.com/coreos/etcd/clientv3"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	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"
 	"github.com/coreos/etcd/snapshot"
 )
 )
 
 

+ 1 - 1
etcdctl/ctlv3/command/printer_protobuf.go

@@ -20,7 +20,7 @@ import (
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	v3 "github.com/coreos/etcd/clientv3"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	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 }
 type pbPrinter struct{ printer }

+ 1 - 1
etcdctl/ctlv3/command/util.go

@@ -26,7 +26,7 @@ import (
 	"time"
 	"time"
 
 
 	v3 "github.com/coreos/etcd/clientv3"
 	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"
 	"github.com/spf13/cobra"
 )
 )

+ 1 - 1
etcdctl/ctlv3/command/version_command.go

@@ -17,7 +17,7 @@ package command
 import (
 import (
 	"fmt"
 	"fmt"
 
 
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/spf13/cobra"
 	"github.com/spf13/cobra"
 )
 )

+ 1 - 1
etcdctl/ctlv3/help.go

@@ -25,7 +25,7 @@ import (
 	"text/tabwriter"
 	"text/tabwriter"
 	"text/template"
 	"text/template"
 
 
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/spf13/cobra"
 	"github.com/spf13/cobra"
 	"github.com/spf13/pflag"
 	"github.com/spf13/pflag"

+ 1 - 1
etcdmain/config.go

@@ -26,9 +26,9 @@ import (
 	"strings"
 	"strings"
 
 
 	"github.com/coreos/etcd/embed"
 	"github.com/coreos/etcd/embed"
-	"github.com/coreos/etcd/internal/version"
 	"github.com/coreos/etcd/pkg/flags"
 	"github.com/coreos/etcd/pkg/flags"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/ghodss/yaml"
 	"github.com/ghodss/yaml"
 )
 )

+ 2 - 2
etcdmain/etcd.go

@@ -26,11 +26,10 @@ import (
 	"strings"
 	"strings"
 	"time"
 	"time"
 
 
+	"github.com/coreos/etcd/discovery"
 	"github.com/coreos/etcd/embed"
 	"github.com/coreos/etcd/embed"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api/etcdhttp"
 	"github.com/coreos/etcd/etcdserver/api/etcdhttp"
-	"github.com/coreos/etcd/internal/discovery"
-	"github.com/coreos/etcd/internal/version"
 	"github.com/coreos/etcd/pkg/cors"
 	"github.com/coreos/etcd/pkg/cors"
 	"github.com/coreos/etcd/pkg/fileutil"
 	"github.com/coreos/etcd/pkg/fileutil"
 	pkgioutil "github.com/coreos/etcd/pkg/ioutil"
 	pkgioutil "github.com/coreos/etcd/pkg/ioutil"
@@ -38,6 +37,7 @@ import (
 	"github.com/coreos/etcd/pkg/transport"
 	"github.com/coreos/etcd/pkg/transport"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/proxy/httpproxy"
 	"github.com/coreos/etcd/proxy/httpproxy"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/coreos/pkg/capnslog"
 	"github.com/coreos/pkg/capnslog"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc"

+ 1 - 1
etcdserver/api/capability.go

@@ -17,7 +17,7 @@ package api
 import (
 import (
 	"sync"
 	"sync"
 
 
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/coreos/go-semver/semver"
 	"github.com/coreos/go-semver/semver"
 	"github.com/coreos/pkg/capnslog"
 	"github.com/coreos/pkg/capnslog"

+ 3 - 3
etcdserver/api/etcdhttp/base.go

@@ -21,12 +21,12 @@ import (
 	"net/http"
 	"net/http"
 	"strings"
 	"strings"
 
 
-	etcdErr "github.com/coreos/etcd/error"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
 	"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/etcdserver/v2error"
 	"github.com/coreos/etcd/pkg/logutil"
 	"github.com/coreos/etcd/pkg/logutil"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/coreos/pkg/capnslog"
 	"github.com/coreos/pkg/capnslog"
 )
 )
@@ -138,7 +138,7 @@ func WriteError(w http.ResponseWriter, r *http.Request, err error) {
 		return
 		return
 	}
 	}
 	switch e := err.(type) {
 	switch e := err.(type) {
-	case *etcdErr.Error:
+	case *v2error.Error:
 		e.WriteTo(w)
 		e.WriteTo(w)
 	case *httptypes.HTTPError:
 	case *httptypes.HTTPError:
 		if et := e.WriteTo(w); et != nil {
 		if et := e.WriteTo(w); et != nil {

+ 1 - 1
etcdserver/api/etcdhttp/peer.go

@@ -20,7 +20,7 @@ import (
 
 
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api"
-	"github.com/coreos/etcd/internal/lease/leasehttp"
+	"github.com/coreos/etcd/lease/leasehttp"
 	"github.com/coreos/etcd/rafthttp"
 	"github.com/coreos/etcd/rafthttp"
 )
 )
 
 

+ 1 - 1
etcdserver/api/etcdhttp/version_test.go

@@ -20,7 +20,7 @@ import (
 	"net/http/httptest"
 	"net/http/httptest"
 	"testing"
 	"testing"
 
 
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/version"
 )
 )
 
 
 func TestServeVersion(t *testing.T) {
 func TestServeVersion(t *testing.T) {

+ 46 - 46
etcdserver/api/v2http/client.go

@@ -27,7 +27,6 @@ import (
 	"strings"
 	"strings"
 	"time"
 	"time"
 
 
-	etcdErr "github.com/coreos/etcd/error"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api/etcdhttp"
 	"github.com/coreos/etcd/etcdserver/api/etcdhttp"
@@ -36,7 +35,8 @@ import (
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/stats"
 	"github.com/coreos/etcd/etcdserver/stats"
 	"github.com/coreos/etcd/etcdserver/v2auth"
 	"github.com/coreos/etcd/etcdserver/v2auth"
-	"github.com/coreos/etcd/internal/store"
+	"github.com/coreos/etcd/etcdserver/v2error"
+	"github.com/coreos/etcd/etcdserver/v2store"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 
 
 	"github.com/jonboulle/clockwork"
 	"github.com/jonboulle/clockwork"
@@ -322,15 +322,15 @@ func parseKeyRequest(r *http.Request, clock clockwork.Clock) (etcdserverpb.Reque
 
 
 	err := r.ParseForm()
 	err := r.ParseForm()
 	if err != nil {
 	if err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidForm,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidForm,
 			err.Error(),
 			err.Error(),
 		)
 		)
 	}
 	}
 
 
 	if !strings.HasPrefix(r.URL.Path, keysPrefix) {
 	if !strings.HasPrefix(r.URL.Path, keysPrefix) {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidForm,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidForm,
 			"incorrect key prefix",
 			"incorrect key prefix",
 		)
 		)
 	}
 	}
@@ -338,75 +338,75 @@ func parseKeyRequest(r *http.Request, clock clockwork.Clock) (etcdserverpb.Reque
 
 
 	var pIdx, wIdx uint64
 	var pIdx, wIdx uint64
 	if pIdx, err = getUint64(r.Form, "prevIndex"); err != nil {
 	if pIdx, err = getUint64(r.Form, "prevIndex"); err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeIndexNaN,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeIndexNaN,
 			`invalid value for "prevIndex"`,
 			`invalid value for "prevIndex"`,
 		)
 		)
 	}
 	}
 	if wIdx, err = getUint64(r.Form, "waitIndex"); err != nil {
 	if wIdx, err = getUint64(r.Form, "waitIndex"); err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeIndexNaN,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeIndexNaN,
 			`invalid value for "waitIndex"`,
 			`invalid value for "waitIndex"`,
 		)
 		)
 	}
 	}
 
 
 	var rec, sort, wait, dir, quorum, stream bool
 	var rec, sort, wait, dir, quorum, stream bool
 	if rec, err = getBool(r.Form, "recursive"); err != nil {
 	if rec, err = getBool(r.Form, "recursive"); err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidField,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidField,
 			`invalid value for "recursive"`,
 			`invalid value for "recursive"`,
 		)
 		)
 	}
 	}
 	if sort, err = getBool(r.Form, "sorted"); err != nil {
 	if sort, err = getBool(r.Form, "sorted"); err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidField,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidField,
 			`invalid value for "sorted"`,
 			`invalid value for "sorted"`,
 		)
 		)
 	}
 	}
 	if wait, err = getBool(r.Form, "wait"); err != nil {
 	if wait, err = getBool(r.Form, "wait"); err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidField,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidField,
 			`invalid value for "wait"`,
 			`invalid value for "wait"`,
 		)
 		)
 	}
 	}
 	// TODO(jonboulle): define what parameters dir is/isn't compatible with?
 	// TODO(jonboulle): define what parameters dir is/isn't compatible with?
 	if dir, err = getBool(r.Form, "dir"); err != nil {
 	if dir, err = getBool(r.Form, "dir"); err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidField,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidField,
 			`invalid value for "dir"`,
 			`invalid value for "dir"`,
 		)
 		)
 	}
 	}
 	if quorum, err = getBool(r.Form, "quorum"); err != nil {
 	if quorum, err = getBool(r.Form, "quorum"); err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidField,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidField,
 			`invalid value for "quorum"`,
 			`invalid value for "quorum"`,
 		)
 		)
 	}
 	}
 	if stream, err = getBool(r.Form, "stream"); err != nil {
 	if stream, err = getBool(r.Form, "stream"); err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidField,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidField,
 			`invalid value for "stream"`,
 			`invalid value for "stream"`,
 		)
 		)
 	}
 	}
 
 
 	if wait && r.Method != "GET" {
 	if wait && r.Method != "GET" {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidField,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidField,
 			`"wait" can only be used with GET requests`,
 			`"wait" can only be used with GET requests`,
 		)
 		)
 	}
 	}
 
 
 	pV := r.FormValue("prevValue")
 	pV := r.FormValue("prevValue")
 	if _, ok := r.Form["prevValue"]; ok && pV == "" {
 	if _, ok := r.Form["prevValue"]; ok && pV == "" {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodePrevValueRequired,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodePrevValueRequired,
 			`"prevValue" cannot be empty`,
 			`"prevValue" cannot be empty`,
 		)
 		)
 	}
 	}
 
 
 	if noValueOnSuccess, err = getBool(r.Form, "noValueOnSuccess"); err != nil {
 	if noValueOnSuccess, err = getBool(r.Form, "noValueOnSuccess"); err != nil {
-		return emptyReq, false, etcdErr.NewRequestError(
-			etcdErr.EcodeInvalidField,
+		return emptyReq, false, v2error.NewRequestError(
+			v2error.EcodeInvalidField,
 			`invalid value for "noValueOnSuccess"`,
 			`invalid value for "noValueOnSuccess"`,
 		)
 		)
 	}
 	}
@@ -417,8 +417,8 @@ func parseKeyRequest(r *http.Request, clock clockwork.Clock) (etcdserverpb.Reque
 	if len(r.FormValue("ttl")) > 0 {
 	if len(r.FormValue("ttl")) > 0 {
 		i, err := getUint64(r.Form, "ttl")
 		i, err := getUint64(r.Form, "ttl")
 		if err != nil {
 		if err != nil {
-			return emptyReq, false, etcdErr.NewRequestError(
-				etcdErr.EcodeTTLNaN,
+			return emptyReq, false, v2error.NewRequestError(
+				v2error.EcodeTTLNaN,
 				`invalid value for "ttl"`,
 				`invalid value for "ttl"`,
 			)
 			)
 		}
 		}
@@ -430,8 +430,8 @@ func parseKeyRequest(r *http.Request, clock clockwork.Clock) (etcdserverpb.Reque
 	if _, ok := r.Form["prevExist"]; ok {
 	if _, ok := r.Form["prevExist"]; ok {
 		bv, err := getBool(r.Form, "prevExist")
 		bv, err := getBool(r.Form, "prevExist")
 		if err != nil {
 		if err != nil {
-			return emptyReq, false, etcdErr.NewRequestError(
-				etcdErr.EcodeInvalidField,
+			return emptyReq, false, v2error.NewRequestError(
+				v2error.EcodeInvalidField,
 				"invalid value for prevExist",
 				"invalid value for prevExist",
 			)
 			)
 		}
 		}
@@ -443,8 +443,8 @@ func parseKeyRequest(r *http.Request, clock clockwork.Clock) (etcdserverpb.Reque
 	if _, ok := r.Form["refresh"]; ok {
 	if _, ok := r.Form["refresh"]; ok {
 		bv, err := getBool(r.Form, "refresh")
 		bv, err := getBool(r.Form, "refresh")
 		if err != nil {
 		if err != nil {
-			return emptyReq, false, etcdErr.NewRequestError(
-				etcdErr.EcodeInvalidField,
+			return emptyReq, false, v2error.NewRequestError(
+				v2error.EcodeInvalidField,
 				"invalid value for refresh",
 				"invalid value for refresh",
 			)
 			)
 		}
 		}
@@ -452,14 +452,14 @@ func parseKeyRequest(r *http.Request, clock clockwork.Clock) (etcdserverpb.Reque
 		if refresh != nil && *refresh {
 		if refresh != nil && *refresh {
 			val := r.FormValue("value")
 			val := r.FormValue("value")
 			if _, ok := r.Form["value"]; ok && val != "" {
 			if _, ok := r.Form["value"]; ok && val != "" {
-				return emptyReq, false, etcdErr.NewRequestError(
-					etcdErr.EcodeRefreshValue,
+				return emptyReq, false, v2error.NewRequestError(
+					v2error.EcodeRefreshValue,
 					`A value was provided on a refresh`,
 					`A value was provided on a refresh`,
 				)
 				)
 			}
 			}
 			if ttl == nil {
 			if ttl == nil {
-				return emptyReq, false, etcdErr.NewRequestError(
-					etcdErr.EcodeRefreshTTLRequired,
+				return emptyReq, false, v2error.NewRequestError(
+					v2error.EcodeRefreshTTLRequired,
 					`No TTL value set`,
 					`No TTL value set`,
 				)
 				)
 			}
 			}
@@ -518,8 +518,8 @@ func writeKeyEvent(w http.ResponseWriter, resp etcdserver.Response, noValueOnSuc
 
 
 	ev = trimEventPrefix(ev, etcdserver.StoreKeysPrefix)
 	ev = trimEventPrefix(ev, etcdserver.StoreKeysPrefix)
 	if noValueOnSuccess &&
 	if noValueOnSuccess &&
-		(ev.Action == store.Set || ev.Action == store.CompareAndSwap ||
-			ev.Action == store.Create || ev.Action == store.Update) {
+		(ev.Action == v2store.Set || ev.Action == v2store.CompareAndSwap ||
+			ev.Action == v2store.Create || ev.Action == v2store.Update) {
 		ev.Node = nil
 		ev.Node = nil
 		ev.PrevNode = nil
 		ev.PrevNode = nil
 	}
 	}
@@ -527,7 +527,7 @@ func writeKeyEvent(w http.ResponseWriter, resp etcdserver.Response, noValueOnSuc
 }
 }
 
 
 func writeKeyNoAuth(w http.ResponseWriter) {
 func writeKeyNoAuth(w http.ResponseWriter) {
-	e := etcdErr.NewError(etcdErr.EcodeUnauthorized, "Insufficient credentials", 0)
+	e := v2error.NewError(v2error.EcodeUnauthorized, "Insufficient credentials", 0)
 	e.WriteTo(w)
 	e.WriteTo(w)
 }
 }
 
 
@@ -538,7 +538,7 @@ func writeKeyError(w http.ResponseWriter, err error) {
 		return
 		return
 	}
 	}
 	switch e := err.(type) {
 	switch e := err.(type) {
-	case *etcdErr.Error:
+	case *v2error.Error:
 		e.WriteTo(w)
 		e.WriteTo(w)
 	default:
 	default:
 		switch err {
 		switch err {
@@ -547,7 +547,7 @@ func writeKeyError(w http.ResponseWriter, err error) {
 		default:
 		default:
 			mlog.MergeErrorf("got unexpected response error (%v)", err)
 			mlog.MergeErrorf("got unexpected response error (%v)", err)
 		}
 		}
-		ee := etcdErr.NewError(etcdErr.EcodeRaftInternal, err.Error(), 0)
+		ee := v2error.NewError(v2error.EcodeRaftInternal, err.Error(), 0)
 		ee.WriteTo(w)
 		ee.WriteTo(w)
 	}
 	}
 }
 }
@@ -599,7 +599,7 @@ func handleKeyWatch(ctx context.Context, w http.ResponseWriter, resp etcdserver.
 	}
 	}
 }
 }
 
 
-func trimEventPrefix(ev *store.Event, prefix string) *store.Event {
+func trimEventPrefix(ev *v2store.Event, prefix string) *v2store.Event {
 	if ev == nil {
 	if ev == nil {
 		return nil
 		return nil
 	}
 	}
@@ -611,7 +611,7 @@ func trimEventPrefix(ev *store.Event, prefix string) *store.Event {
 	return e
 	return e
 }
 }
 
 
-func trimNodeExternPrefix(n *store.NodeExtern, prefix string) {
+func trimNodeExternPrefix(n *v2store.NodeExtern, prefix string) {
 	if n == nil {
 	if n == nil {
 		return
 		return
 	}
 	}
@@ -622,7 +622,7 @@ func trimNodeExternPrefix(n *store.NodeExtern, prefix string) {
 }
 }
 
 
 func trimErrorPrefix(err error, prefix string) error {
 func trimErrorPrefix(err error, prefix string) error {
-	if e, ok := err.(*etcdErr.Error); ok {
+	if e, ok := err.(*v2error.Error); ok {
 		e.Cause = strings.TrimPrefix(e.Cause, prefix)
 		e.Cause = strings.TrimPrefix(e.Cause, prefix)
 	}
 	}
 	return err
 	return err

+ 115 - 115
etcdserver/api/v2http/client_test.go

@@ -29,13 +29,13 @@ import (
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
-	etcdErr "github.com/coreos/etcd/error"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
 	"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/membership"
-	"github.com/coreos/etcd/internal/store"
+	"github.com/coreos/etcd/etcdserver/v2error"
+	"github.com/coreos/etcd/etcdserver/v2store"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
@@ -44,7 +44,7 @@ import (
 	"github.com/jonboulle/clockwork"
 	"github.com/jonboulle/clockwork"
 )
 )
 
 
-func mustMarshalEvent(t *testing.T, ev *store.Event) string {
+func mustMarshalEvent(t *testing.T, ev *v2store.Event) string {
 	b := new(bytes.Buffer)
 	b := new(bytes.Buffer)
 	if err := json.NewEncoder(b).Encode(ev); err != nil {
 	if err := json.NewEncoder(b).Encode(ev); err != nil {
 		t.Fatalf("error marshalling event %#v: %v", ev, err)
 		t.Fatalf("error marshalling event %#v: %v", ev, err)
@@ -176,11 +176,11 @@ func (drt dummyRaftTimer) Index() uint64 { return uint64(100) }
 func (drt dummyRaftTimer) Term() uint64  { return uint64(5) }
 func (drt dummyRaftTimer) Term() uint64  { return uint64(5) }
 
 
 type dummyWatcher struct {
 type dummyWatcher struct {
-	echan chan *store.Event
+	echan chan *v2store.Event
 	sidx  uint64
 	sidx  uint64
 }
 }
 
 
-func (w *dummyWatcher) EventChan() chan *store.Event {
+func (w *dummyWatcher) EventChan() chan *v2store.Event {
 	return w.echan
 	return w.echan
 }
 }
 func (w *dummyWatcher) StartIndex() uint64 { return w.sidx }
 func (w *dummyWatcher) StartIndex() uint64 { return w.sidx }
@@ -193,19 +193,19 @@ func TestBadRefreshRequest(t *testing.T) {
 	}{
 	}{
 		{
 		{
 			mustNewRequest(t, "foo?refresh=true&value=test"),
 			mustNewRequest(t, "foo?refresh=true&value=test"),
-			etcdErr.EcodeRefreshValue,
+			v2error.EcodeRefreshValue,
 		},
 		},
 		{
 		{
 			mustNewRequest(t, "foo?refresh=true&value=10"),
 			mustNewRequest(t, "foo?refresh=true&value=10"),
-			etcdErr.EcodeRefreshValue,
+			v2error.EcodeRefreshValue,
 		},
 		},
 		{
 		{
 			mustNewRequest(t, "foo?refresh=true"),
 			mustNewRequest(t, "foo?refresh=true"),
-			etcdErr.EcodeRefreshTTLRequired,
+			v2error.EcodeRefreshTTLRequired,
 		},
 		},
 		{
 		{
 			mustNewRequest(t, "foo?refresh=true&ttl="),
 			mustNewRequest(t, "foo?refresh=true&ttl="),
-			etcdErr.EcodeRefreshTTLRequired,
+			v2error.EcodeRefreshTTLRequired,
 		},
 		},
 	}
 	}
 	for i, tt := range tests {
 	for i, tt := range tests {
@@ -214,7 +214,7 @@ func TestBadRefreshRequest(t *testing.T) {
 			t.Errorf("#%d: unexpected nil error!", i)
 			t.Errorf("#%d: unexpected nil error!", i)
 			continue
 			continue
 		}
 		}
-		ee, ok := err.(*etcdErr.Error)
+		ee, ok := err.(*v2error.Error)
 		if !ok {
 		if !ok {
 			t.Errorf("#%d: err is not etcd.Error!", i)
 			t.Errorf("#%d: err is not etcd.Error!", i)
 			continue
 			continue
@@ -240,119 +240,119 @@ func TestBadParseRequest(t *testing.T) {
 				Body:   nil,
 				Body:   nil,
 				Method: "PUT",
 				Method: "PUT",
 			},
 			},
-			etcdErr.EcodeInvalidForm,
+			v2error.EcodeInvalidForm,
 		},
 		},
 		{
 		{
 			// bad key prefix
 			// bad key prefix
 			&http.Request{
 			&http.Request{
 				URL: testutil.MustNewURL(t, "/badprefix/"),
 				URL: testutil.MustNewURL(t, "/badprefix/"),
 			},
 			},
-			etcdErr.EcodeInvalidForm,
+			v2error.EcodeInvalidForm,
 		},
 		},
 		// bad values for prevIndex, waitIndex, ttl
 		// bad values for prevIndex, waitIndex, ttl
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"prevIndex": []string{"garbage"}}),
 			mustNewForm(t, "foo", url.Values{"prevIndex": []string{"garbage"}}),
-			etcdErr.EcodeIndexNaN,
+			v2error.EcodeIndexNaN,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"prevIndex": []string{"1.5"}}),
 			mustNewForm(t, "foo", url.Values{"prevIndex": []string{"1.5"}}),
-			etcdErr.EcodeIndexNaN,
+			v2error.EcodeIndexNaN,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"prevIndex": []string{"-1"}}),
 			mustNewForm(t, "foo", url.Values{"prevIndex": []string{"-1"}}),
-			etcdErr.EcodeIndexNaN,
+			v2error.EcodeIndexNaN,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"waitIndex": []string{"garbage"}}),
 			mustNewForm(t, "foo", url.Values{"waitIndex": []string{"garbage"}}),
-			etcdErr.EcodeIndexNaN,
+			v2error.EcodeIndexNaN,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"waitIndex": []string{"??"}}),
 			mustNewForm(t, "foo", url.Values{"waitIndex": []string{"??"}}),
-			etcdErr.EcodeIndexNaN,
+			v2error.EcodeIndexNaN,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"ttl": []string{"-1"}}),
 			mustNewForm(t, "foo", url.Values{"ttl": []string{"-1"}}),
-			etcdErr.EcodeTTLNaN,
+			v2error.EcodeTTLNaN,
 		},
 		},
 		// bad values for recursive, sorted, wait, prevExist, dir, stream
 		// bad values for recursive, sorted, wait, prevExist, dir, stream
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"recursive": []string{"hahaha"}}),
 			mustNewForm(t, "foo", url.Values{"recursive": []string{"hahaha"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"recursive": []string{"1234"}}),
 			mustNewForm(t, "foo", url.Values{"recursive": []string{"1234"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"recursive": []string{"?"}}),
 			mustNewForm(t, "foo", url.Values{"recursive": []string{"?"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"sorted": []string{"?"}}),
 			mustNewForm(t, "foo", url.Values{"sorted": []string{"?"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"sorted": []string{"x"}}),
 			mustNewForm(t, "foo", url.Values{"sorted": []string{"x"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"wait": []string{"?!"}}),
 			mustNewForm(t, "foo", url.Values{"wait": []string{"?!"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"wait": []string{"yes"}}),
 			mustNewForm(t, "foo", url.Values{"wait": []string{"yes"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"prevExist": []string{"yes"}}),
 			mustNewForm(t, "foo", url.Values{"prevExist": []string{"yes"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"prevExist": []string{"#2"}}),
 			mustNewForm(t, "foo", url.Values{"prevExist": []string{"#2"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"dir": []string{"no"}}),
 			mustNewForm(t, "foo", url.Values{"dir": []string{"no"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"dir": []string{"file"}}),
 			mustNewForm(t, "foo", url.Values{"dir": []string{"file"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"quorum": []string{"no"}}),
 			mustNewForm(t, "foo", url.Values{"quorum": []string{"no"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"quorum": []string{"file"}}),
 			mustNewForm(t, "foo", url.Values{"quorum": []string{"file"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"stream": []string{"zzz"}}),
 			mustNewForm(t, "foo", url.Values{"stream": []string{"zzz"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"stream": []string{"something"}}),
 			mustNewForm(t, "foo", url.Values{"stream": []string{"something"}}),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		// prevValue cannot be empty
 		// prevValue cannot be empty
 		{
 		{
 			mustNewForm(t, "foo", url.Values{"prevValue": []string{""}}),
 			mustNewForm(t, "foo", url.Values{"prevValue": []string{""}}),
-			etcdErr.EcodePrevValueRequired,
+			v2error.EcodePrevValueRequired,
 		},
 		},
 		// wait is only valid with GET requests
 		// wait is only valid with GET requests
 		{
 		{
 			mustNewMethodRequest(t, "HEAD", "foo?wait=true"),
 			mustNewMethodRequest(t, "HEAD", "foo?wait=true"),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		// query values are considered
 		// query values are considered
 		{
 		{
 			mustNewRequest(t, "foo?prevExist=wrong"),
 			mustNewRequest(t, "foo?prevExist=wrong"),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 		{
 		{
 			mustNewRequest(t, "foo?ttl=wrong"),
 			mustNewRequest(t, "foo?ttl=wrong"),
-			etcdErr.EcodeTTLNaN,
+			v2error.EcodeTTLNaN,
 		},
 		},
 		// but body takes precedence if both are specified
 		// but body takes precedence if both are specified
 		{
 		{
@@ -361,7 +361,7 @@ func TestBadParseRequest(t *testing.T) {
 				"foo?ttl=12",
 				"foo?ttl=12",
 				url.Values{"ttl": []string{"garbage"}},
 				url.Values{"ttl": []string{"garbage"}},
 			),
 			),
-			etcdErr.EcodeTTLNaN,
+			v2error.EcodeTTLNaN,
 		},
 		},
 		{
 		{
 			mustNewForm(
 			mustNewForm(
@@ -369,7 +369,7 @@ func TestBadParseRequest(t *testing.T) {
 				"foo?prevExist=false",
 				"foo?prevExist=false",
 				url.Values{"prevExist": []string{"yes"}},
 				url.Values{"prevExist": []string{"yes"}},
 			),
 			),
-			etcdErr.EcodeInvalidField,
+			v2error.EcodeInvalidField,
 		},
 		},
 	}
 	}
 	for i, tt := range tests {
 	for i, tt := range tests {
@@ -378,7 +378,7 @@ func TestBadParseRequest(t *testing.T) {
 			t.Errorf("#%d: unexpected nil error!", i)
 			t.Errorf("#%d: unexpected nil error!", i)
 			continue
 			continue
 		}
 		}
-		ee, ok := err.(*etcdErr.Error)
+		ee, ok := err.(*v2error.Error)
 		if !ok {
 		if !ok {
 			t.Errorf("#%d: err is not etcd.Error!", i)
 			t.Errorf("#%d: err is not etcd.Error!", i)
 			continue
 			continue
@@ -1172,7 +1172,7 @@ func TestWriteEvent(t *testing.T) {
 	}
 	}
 
 
 	tests := []struct {
 	tests := []struct {
-		ev      *store.Event
+		ev      *v2store.Event
 		noValue bool
 		noValue bool
 		idx     string
 		idx     string
 		// TODO(jonboulle): check body as well as just status code
 		// TODO(jonboulle): check body as well as just status code
@@ -1181,10 +1181,10 @@ func TestWriteEvent(t *testing.T) {
 	}{
 	}{
 		// standard case, standard 200 response
 		// standard case, standard 200 response
 		{
 		{
-			&store.Event{
-				Action:   store.Get,
-				Node:     &store.NodeExtern{},
-				PrevNode: &store.NodeExtern{},
+			&v2store.Event{
+				Action:   v2store.Get,
+				Node:     &v2store.NodeExtern{},
+				PrevNode: &v2store.NodeExtern{},
 			},
 			},
 			false,
 			false,
 			"0",
 			"0",
@@ -1193,10 +1193,10 @@ func TestWriteEvent(t *testing.T) {
 		},
 		},
 		// check new nodes return StatusCreated
 		// check new nodes return StatusCreated
 		{
 		{
-			&store.Event{
-				Action:   store.Create,
-				Node:     &store.NodeExtern{},
-				PrevNode: &store.NodeExtern{},
+			&v2store.Event{
+				Action:   v2store.Create,
+				Node:     &v2store.NodeExtern{},
+				PrevNode: &v2store.NodeExtern{},
 			},
 			},
 			false,
 			false,
 			"0",
 			"0",
@@ -1470,7 +1470,7 @@ func TestBadServeKeys(t *testing.T) {
 			// etcdserver.Server etcd error
 			// etcdserver.Server etcd error
 			mustNewRequest(t, "foo"),
 			mustNewRequest(t, "foo"),
 			&errServer{
 			&errServer{
-				err: etcdErr.NewError(etcdErr.EcodeKeyNotFound, "/1/pant", 0),
+				err: v2error.NewError(v2error.EcodeKeyNotFound, "/1/pant", 0),
 			},
 			},
 
 
 			http.StatusNotFound,
 			http.StatusNotFound,
@@ -1539,9 +1539,9 @@ func TestServeKeysGood(t *testing.T) {
 	}
 	}
 	server := &resServer{
 	server := &resServer{
 		res: etcdserver.Response{
 		res: etcdserver.Response{
-			Event: &store.Event{
-				Action: store.Get,
-				Node:   &store.NodeExtern{},
+			Event: &v2store.Event{
+				Action: v2store.Get,
+				Node:   &v2store.NodeExtern{},
 			},
 			},
 		},
 		},
 	}
 	}
@@ -1564,20 +1564,20 @@ func TestServeKeysEvent(t *testing.T) {
 		req   *http.Request
 		req   *http.Request
 		rsp   etcdserver.Response
 		rsp   etcdserver.Response
 		wcode int
 		wcode int
-		event *store.Event
+		event *v2store.Event
 	}{
 	}{
 		{
 		{
 			mustNewRequest(t, "foo"),
 			mustNewRequest(t, "foo"),
 			etcdserver.Response{
 			etcdserver.Response{
-				Event: &store.Event{
-					Action: store.Get,
-					Node:   &store.NodeExtern{},
+				Event: &v2store.Event{
+					Action: v2store.Get,
+					Node:   &v2store.NodeExtern{},
 				},
 				},
 			},
 			},
 			http.StatusOK,
 			http.StatusOK,
-			&store.Event{
-				Action: store.Get,
-				Node:   &store.NodeExtern{},
+			&v2store.Event{
+				Action: v2store.Get,
+				Node:   &v2store.NodeExtern{},
 			},
 			},
 		},
 		},
 		{
 		{
@@ -1587,14 +1587,14 @@ func TestServeKeysEvent(t *testing.T) {
 				url.Values{"noValueOnSuccess": []string{"true"}},
 				url.Values{"noValueOnSuccess": []string{"true"}},
 			),
 			),
 			etcdserver.Response{
 			etcdserver.Response{
-				Event: &store.Event{
-					Action: store.CompareAndSwap,
-					Node:   &store.NodeExtern{},
+				Event: &v2store.Event{
+					Action: v2store.CompareAndSwap,
+					Node:   &v2store.NodeExtern{},
 				},
 				},
 			},
 			},
 			http.StatusOK,
 			http.StatusOK,
-			&store.Event{
-				Action: store.CompareAndSwap,
+			&v2store.Event{
+				Action: v2store.CompareAndSwap,
 				Node:   nil,
 				Node:   nil,
 			},
 			},
 		},
 		},
@@ -1634,7 +1634,7 @@ func TestServeKeysEvent(t *testing.T) {
 
 
 func TestServeKeysWatch(t *testing.T) {
 func TestServeKeysWatch(t *testing.T) {
 	req := mustNewRequest(t, "/foo/bar")
 	req := mustNewRequest(t, "/foo/bar")
-	ec := make(chan *store.Event)
+	ec := make(chan *v2store.Event)
 	dw := &dummyWatcher{
 	dw := &dummyWatcher{
 		echan: ec,
 		echan: ec,
 	}
 	}
@@ -1649,9 +1649,9 @@ func TestServeKeysWatch(t *testing.T) {
 		cluster: &fakeCluster{id: 1},
 		cluster: &fakeCluster{id: 1},
 	}
 	}
 	go func() {
 	go func() {
-		ec <- &store.Event{
-			Action: store.Get,
-			Node:   &store.NodeExtern{},
+		ec <- &v2store.Event{
+			Action: v2store.Get,
+			Node:   &v2store.NodeExtern{},
 		}
 		}
 	}()
 	}()
 	rw := httptest.NewRecorder()
 	rw := httptest.NewRecorder()
@@ -1661,9 +1661,9 @@ func TestServeKeysWatch(t *testing.T) {
 	wcode := http.StatusOK
 	wcode := http.StatusOK
 	wbody := mustMarshalEvent(
 	wbody := mustMarshalEvent(
 		t,
 		t,
-		&store.Event{
-			Action: store.Get,
-			Node:   &store.NodeExtern{},
+		&v2store.Event{
+			Action: v2store.Get,
+			Node:   &v2store.NodeExtern{},
 		},
 		},
 	)
 	)
 
 
@@ -1695,12 +1695,12 @@ func TestHandleWatch(t *testing.T) {
 		r := httptest.NewRecorder()
 		r := httptest.NewRecorder()
 		return r, r
 		return r, r
 	}
 	}
-	noopEv := func(chan *store.Event) {}
+	noopEv := func(chan *v2store.Event) {}
 
 
 	tests := []struct {
 	tests := []struct {
 		getCtx   func() context.Context
 		getCtx   func() context.Context
 		getRwRr  func() (http.ResponseWriter, *httptest.ResponseRecorder)
 		getRwRr  func() (http.ResponseWriter, *httptest.ResponseRecorder)
-		doToChan func(chan *store.Event)
+		doToChan func(chan *v2store.Event)
 
 
 		wbody string
 		wbody string
 	}{
 	}{
@@ -1708,18 +1708,18 @@ func TestHandleWatch(t *testing.T) {
 			// Normal case: one event
 			// Normal case: one event
 			context.Background,
 			context.Background,
 			defaultRwRr,
 			defaultRwRr,
-			func(ch chan *store.Event) {
-				ch <- &store.Event{
-					Action: store.Get,
-					Node:   &store.NodeExtern{},
+			func(ch chan *v2store.Event) {
+				ch <- &v2store.Event{
+					Action: v2store.Get,
+					Node:   &v2store.NodeExtern{},
 				}
 				}
 			},
 			},
 
 
 			mustMarshalEvent(
 			mustMarshalEvent(
 				t,
 				t,
-				&store.Event{
-					Action: store.Get,
-					Node:   &store.NodeExtern{},
+				&v2store.Event{
+					Action: v2store.Get,
+					Node:   &v2store.NodeExtern{},
 				},
 				},
 			),
 			),
 		},
 		},
@@ -1727,7 +1727,7 @@ func TestHandleWatch(t *testing.T) {
 			// Channel is closed, no event
 			// Channel is closed, no event
 			context.Background,
 			context.Background,
 			defaultRwRr,
 			defaultRwRr,
-			func(ch chan *store.Event) {
+			func(ch chan *v2store.Event) {
 				close(ch)
 				close(ch)
 			},
 			},
 
 
@@ -1765,7 +1765,7 @@ func TestHandleWatch(t *testing.T) {
 	for i, tt := range tests {
 	for i, tt := range tests {
 		rw, rr := tt.getRwRr()
 		rw, rr := tt.getRwRr()
 		wa := &dummyWatcher{
 		wa := &dummyWatcher{
-			echan: make(chan *store.Event, 1),
+			echan: make(chan *v2store.Event, 1),
 			sidx:  10,
 			sidx:  10,
 		}
 		}
 		tt.doToChan(wa.echan)
 		tt.doToChan(wa.echan)
@@ -1808,7 +1808,7 @@ func TestHandleWatchStreaming(t *testing.T) {
 		make(chan struct{}, 1),
 		make(chan struct{}, 1),
 	}
 	}
 	wa := &dummyWatcher{
 	wa := &dummyWatcher{
-		echan: make(chan *store.Event),
+		echan: make(chan *v2store.Event),
 	}
 	}
 
 
 	// Launch the streaming handler in the background with a cancellable context
 	// Launch the streaming handler in the background with a cancellable context
@@ -1846,9 +1846,9 @@ func TestHandleWatchStreaming(t *testing.T) {
 
 
 	// Now send the first event
 	// Now send the first event
 	select {
 	select {
-	case wa.echan <- &store.Event{
-		Action: store.Get,
-		Node:   &store.NodeExtern{},
+	case wa.echan <- &v2store.Event{
+		Action: v2store.Get,
+		Node:   &v2store.NodeExtern{},
 	}:
 	}:
 	case <-time.After(time.Second):
 	case <-time.After(time.Second):
 		t.Fatal("timed out waiting for send")
 		t.Fatal("timed out waiting for send")
@@ -1864,9 +1864,9 @@ func TestHandleWatchStreaming(t *testing.T) {
 	// And check the body is as expected
 	// And check the body is as expected
 	wbody = mustMarshalEvent(
 	wbody = mustMarshalEvent(
 		t,
 		t,
-		&store.Event{
-			Action: store.Get,
-			Node:   &store.NodeExtern{},
+		&v2store.Event{
+			Action: v2store.Get,
+			Node:   &v2store.NodeExtern{},
 		},
 		},
 	)
 	)
 	g = rw.Body.String()
 	g = rw.Body.String()
@@ -1876,9 +1876,9 @@ func TestHandleWatchStreaming(t *testing.T) {
 
 
 	// Rinse and repeat
 	// Rinse and repeat
 	select {
 	select {
-	case wa.echan <- &store.Event{
-		Action: store.Get,
-		Node:   &store.NodeExtern{},
+	case wa.echan <- &v2store.Event{
+		Action: v2store.Get,
+		Node:   &v2store.NodeExtern{},
 	}:
 	}:
 	case <-time.After(time.Second):
 	case <-time.After(time.Second):
 		t.Fatal("timed out waiting for send")
 		t.Fatal("timed out waiting for send")
@@ -1910,33 +1910,33 @@ func TestHandleWatchStreaming(t *testing.T) {
 func TestTrimEventPrefix(t *testing.T) {
 func TestTrimEventPrefix(t *testing.T) {
 	pre := "/abc"
 	pre := "/abc"
 	tests := []struct {
 	tests := []struct {
-		ev  *store.Event
-		wev *store.Event
+		ev  *v2store.Event
+		wev *v2store.Event
 	}{
 	}{
 		{
 		{
 			nil,
 			nil,
 			nil,
 			nil,
 		},
 		},
 		{
 		{
-			&store.Event{},
-			&store.Event{},
+			&v2store.Event{},
+			&v2store.Event{},
 		},
 		},
 		{
 		{
-			&store.Event{Node: &store.NodeExtern{Key: "/abc/def"}},
-			&store.Event{Node: &store.NodeExtern{Key: "/def"}},
+			&v2store.Event{Node: &v2store.NodeExtern{Key: "/abc/def"}},
+			&v2store.Event{Node: &v2store.NodeExtern{Key: "/def"}},
 		},
 		},
 		{
 		{
-			&store.Event{PrevNode: &store.NodeExtern{Key: "/abc/ghi"}},
-			&store.Event{PrevNode: &store.NodeExtern{Key: "/ghi"}},
+			&v2store.Event{PrevNode: &v2store.NodeExtern{Key: "/abc/ghi"}},
+			&v2store.Event{PrevNode: &v2store.NodeExtern{Key: "/ghi"}},
 		},
 		},
 		{
 		{
-			&store.Event{
-				Node:     &store.NodeExtern{Key: "/abc/def"},
-				PrevNode: &store.NodeExtern{Key: "/abc/ghi"},
+			&v2store.Event{
+				Node:     &v2store.NodeExtern{Key: "/abc/def"},
+				PrevNode: &v2store.NodeExtern{Key: "/abc/ghi"},
 			},
 			},
-			&store.Event{
-				Node:     &store.NodeExtern{Key: "/def"},
-				PrevNode: &store.NodeExtern{Key: "/ghi"},
+			&v2store.Event{
+				Node:     &v2store.NodeExtern{Key: "/def"},
+				PrevNode: &v2store.NodeExtern{Key: "/ghi"},
 			},
 			},
 		},
 		},
 	}
 	}
@@ -1951,28 +1951,28 @@ func TestTrimEventPrefix(t *testing.T) {
 func TestTrimNodeExternPrefix(t *testing.T) {
 func TestTrimNodeExternPrefix(t *testing.T) {
 	pre := "/abc"
 	pre := "/abc"
 	tests := []struct {
 	tests := []struct {
-		n  *store.NodeExtern
-		wn *store.NodeExtern
+		n  *v2store.NodeExtern
+		wn *v2store.NodeExtern
 	}{
 	}{
 		{
 		{
 			nil,
 			nil,
 			nil,
 			nil,
 		},
 		},
 		{
 		{
-			&store.NodeExtern{Key: "/abc/def"},
-			&store.NodeExtern{Key: "/def"},
+			&v2store.NodeExtern{Key: "/abc/def"},
+			&v2store.NodeExtern{Key: "/def"},
 		},
 		},
 		{
 		{
-			&store.NodeExtern{
+			&v2store.NodeExtern{
 				Key: "/abc/def",
 				Key: "/abc/def",
-				Nodes: []*store.NodeExtern{
+				Nodes: []*v2store.NodeExtern{
 					{Key: "/abc/def/1"},
 					{Key: "/abc/def/1"},
 					{Key: "/abc/def/2"},
 					{Key: "/abc/def/2"},
 				},
 				},
 			},
 			},
-			&store.NodeExtern{
+			&v2store.NodeExtern{
 				Key: "/def",
 				Key: "/def",
-				Nodes: []*store.NodeExtern{
+				Nodes: []*v2store.NodeExtern{
 					{Key: "/def/1"},
 					{Key: "/def/1"},
 					{Key: "/def/2"},
 					{Key: "/def/2"},
 				},
 				},

+ 3 - 3
etcdserver/api/v2http/http_test.go

@@ -22,10 +22,10 @@ import (
 	"sort"
 	"sort"
 	"testing"
 	"testing"
 
 
-	etcdErr "github.com/coreos/etcd/error"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/membership"
+	"github.com/coreos/etcd/etcdserver/v2error"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
 
 
@@ -94,12 +94,12 @@ func TestWriteError(t *testing.T) {
 		wi    string
 		wi    string
 	}{
 	}{
 		{
 		{
-			etcdErr.NewError(etcdErr.EcodeKeyNotFound, "/foo/bar", 123),
+			v2error.NewError(v2error.EcodeKeyNotFound, "/foo/bar", 123),
 			http.StatusNotFound,
 			http.StatusNotFound,
 			"123",
 			"123",
 		},
 		},
 		{
 		{
-			etcdErr.NewError(etcdErr.EcodeTestFailed, "/foo/bar", 456),
+			v2error.NewError(v2error.EcodeTestFailed, "/foo/bar", 456),
 			http.StatusPreconditionFailed,
 			http.StatusPreconditionFailed,
 			"456",
 			"456",
 		},
 		},

+ 3 - 3
etcdserver/api/v2http/metrics.go

@@ -20,10 +20,10 @@ import (
 
 
 	"net/http"
 	"net/http"
 
 
-	etcdErr "github.com/coreos/etcd/error"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
 	"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
+	"github.com/coreos/etcd/etcdserver/v2error"
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/prometheus/client_golang/prometheus"
 )
 )
 
 
@@ -86,8 +86,8 @@ func codeFromError(err error) int {
 		return http.StatusInternalServerError
 		return http.StatusInternalServerError
 	}
 	}
 	switch e := err.(type) {
 	switch e := err.(type) {
-	case *etcdErr.Error:
-		return (*etcdErr.Error)(e).StatusCode()
+	case *v2error.Error:
+		return (*v2error.Error)(e).StatusCode()
 	case *httptypes.HTTPError:
 	case *httptypes.HTTPError:
 		return (*httptypes.HTTPError)(e).Code
 		return (*httptypes.HTTPError)(e).Code
 	default:
 	default:

+ 84 - 84
etcdserver/api/v2v3/store.go

@@ -23,9 +23,9 @@ import (
 
 
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3/concurrency"
 	"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/etcdserver/v2error"
+	"github.com/coreos/etcd/etcdserver/v2store"
+	"github.com/coreos/etcd/mvcc/mvccpb"
 )
 )
 
 
 // store implements the Store interface for V2 using
 // store implements the Store interface for V2 using
@@ -41,13 +41,13 @@ const maxPathDepth = 63
 
 
 var errUnsupported = fmt.Errorf("TTLs are unsupported")
 var errUnsupported = fmt.Errorf("TTLs are unsupported")
 
 
-func NewStore(c *clientv3.Client, pfx string) store.Store { return newStore(c, pfx) }
+func NewStore(c *clientv3.Client, pfx string) v2store.Store { return newStore(c, pfx) }
 
 
 func newStore(c *clientv3.Client, pfx string) *v2v3Store { return &v2v3Store{c, pfx, c.Ctx()} }
 func newStore(c *clientv3.Client, pfx string) *v2v3Store { return &v2v3Store{c, pfx, c.Ctx()} }
 
 
 func (s *v2v3Store) Index() uint64 { panic("STUB") }
 func (s *v2v3Store) Index() uint64 { panic("STUB") }
 
 
-func (s *v2v3Store) Get(nodePath string, recursive, sorted bool) (*store.Event, error) {
+func (s *v2v3Store) Get(nodePath string, recursive, sorted bool) (*v2store.Event, error) {
 	key := s.mkPath(nodePath)
 	key := s.mkPath(nodePath)
 	resp, err := s.c.Txn(s.ctx).Then(
 	resp, err := s.c.Txn(s.ctx).Then(
 		clientv3.OpGet(key+"/"),
 		clientv3.OpGet(key+"/"),
@@ -66,9 +66,9 @@ func (s *v2v3Store) Get(nodePath string, recursive, sorted bool) (*store.Event,
 		if len(kvs) > 0 {
 		if len(kvs) > 0 {
 			cidx, midx = mkV2Rev(kvs[0].CreateRevision), mkV2Rev(kvs[0].ModRevision)
 			cidx, midx = mkV2Rev(kvs[0].CreateRevision), mkV2Rev(kvs[0].ModRevision)
 		}
 		}
-		return &store.Event{
-			Action: store.Get,
-			Node: &store.NodeExtern{
+		return &v2store.Event{
+			Action: v2store.Get,
+			Node: &v2store.NodeExtern{
 				Key:           nodePath,
 				Key:           nodePath,
 				Dir:           true,
 				Dir:           true,
 				Nodes:         nodes,
 				Nodes:         nodes,
@@ -81,23 +81,23 @@ func (s *v2v3Store) Get(nodePath string, recursive, sorted bool) (*store.Event,
 
 
 	kvs := resp.Responses[1].GetResponseRange().Kvs
 	kvs := resp.Responses[1].GetResponseRange().Kvs
 	if len(kvs) == 0 {
 	if len(kvs) == 0 {
-		return nil, etcdErr.NewError(etcdErr.EcodeKeyNotFound, nodePath, mkV2Rev(resp.Header.Revision))
+		return nil, v2error.NewError(v2error.EcodeKeyNotFound, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 
 
-	return &store.Event{
-		Action:    store.Get,
+	return &v2store.Event{
+		Action:    v2store.Get,
 		Node:      s.mkV2Node(kvs[0]),
 		Node:      s.mkV2Node(kvs[0]),
 		EtcdIndex: mkV2Rev(resp.Header.Revision),
 		EtcdIndex: mkV2Rev(resp.Header.Revision),
 	}, nil
 	}, nil
 }
 }
 
 
-func (s *v2v3Store) getDir(nodePath string, recursive, sorted bool, rev int64) ([]*store.NodeExtern, error) {
+func (s *v2v3Store) getDir(nodePath string, recursive, sorted bool, rev int64) ([]*v2store.NodeExtern, error) {
 	rootNodes, err := s.getDirDepth(nodePath, 1, rev)
 	rootNodes, err := s.getDirDepth(nodePath, 1, rev)
 	if err != nil || !recursive {
 	if err != nil || !recursive {
 		return rootNodes, err
 		return rootNodes, err
 	}
 	}
 	nextNodes := rootNodes
 	nextNodes := rootNodes
-	nodes := make(map[string]*store.NodeExtern)
+	nodes := make(map[string]*v2store.NodeExtern)
 	// Breadth walk the subdirectories
 	// Breadth walk the subdirectories
 	for i := 2; len(nextNodes) > 0; i++ {
 	for i := 2; len(nextNodes) > 0; i++ {
 		for _, n := range nextNodes {
 		for _, n := range nextNodes {
@@ -113,14 +113,14 @@ func (s *v2v3Store) getDir(nodePath string, recursive, sorted bool, rev int64) (
 	return rootNodes, nil
 	return rootNodes, nil
 }
 }
 
 
-func (s *v2v3Store) getDirDepth(nodePath string, depth int, rev int64) ([]*store.NodeExtern, error) {
+func (s *v2v3Store) getDirDepth(nodePath string, depth int, rev int64) ([]*v2store.NodeExtern, error) {
 	pd := s.mkPathDepth(nodePath, depth)
 	pd := s.mkPathDepth(nodePath, depth)
 	resp, err := s.c.Get(s.ctx, pd, clientv3.WithPrefix(), clientv3.WithRev(rev))
 	resp, err := s.c.Get(s.ctx, pd, clientv3.WithPrefix(), clientv3.WithRev(rev))
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
 
 
-	nodes := make([]*store.NodeExtern, len(resp.Kvs))
+	nodes := make([]*v2store.NodeExtern, len(resp.Kvs))
 	for i, kv := range resp.Kvs {
 	for i, kv := range resp.Kvs {
 		nodes[i] = s.mkV2Node(kv)
 		nodes[i] = s.mkV2Node(kv)
 	}
 	}
@@ -131,21 +131,21 @@ func (s *v2v3Store) Set(
 	nodePath string,
 	nodePath string,
 	dir bool,
 	dir bool,
 	value string,
 	value string,
-	expireOpts store.TTLOptionSet,
-) (*store.Event, error) {
+	expireOpts v2store.TTLOptionSet,
+) (*v2store.Event, error) {
 	if expireOpts.Refresh || !expireOpts.ExpireTime.IsZero() {
 	if expireOpts.Refresh || !expireOpts.ExpireTime.IsZero() {
 		return nil, errUnsupported
 		return nil, errUnsupported
 	}
 	}
 
 
 	if isRoot(nodePath) {
 	if isRoot(nodePath) {
-		return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, nodePath, 0)
+		return nil, v2error.NewError(v2error.EcodeRootROnly, nodePath, 0)
 	}
 	}
 
 
 	ecode := 0
 	ecode := 0
 	applyf := func(stm concurrency.STM) error {
 	applyf := func(stm concurrency.STM) error {
 		parent := path.Dir(nodePath)
 		parent := path.Dir(nodePath)
 		if !isRoot(parent) && stm.Rev(s.mkPath(parent)+"/") == 0 {
 		if !isRoot(parent) && stm.Rev(s.mkPath(parent)+"/") == 0 {
-			ecode = etcdErr.EcodeKeyNotFound
+			ecode = v2error.EcodeKeyNotFound
 			return nil
 			return nil
 		}
 		}
 
 
@@ -153,16 +153,16 @@ func (s *v2v3Store) Set(
 		if dir {
 		if dir {
 			if stm.Rev(key) != 0 {
 			if stm.Rev(key) != 0 {
 				// exists as non-dir
 				// exists as non-dir
-				ecode = etcdErr.EcodeNotDir
+				ecode = v2error.EcodeNotDir
 				return nil
 				return nil
 			}
 			}
 			key = key + "/"
 			key = key + "/"
 		} else if stm.Rev(key+"/") != 0 {
 		} else if stm.Rev(key+"/") != 0 {
-			ecode = etcdErr.EcodeNotFile
+			ecode = v2error.EcodeNotFile
 			return nil
 			return nil
 		}
 		}
 		stm.Put(key, value, clientv3.WithPrevKV())
 		stm.Put(key, value, clientv3.WithPrevKV())
-		stm.Put(s.mkActionKey(), store.Set)
+		stm.Put(s.mkActionKey(), v2store.Set)
 		return nil
 		return nil
 	}
 	}
 
 
@@ -171,11 +171,11 @@ func (s *v2v3Store) Set(
 		return nil, err
 		return nil, err
 	}
 	}
 	if ecode != 0 {
 	if ecode != 0 {
-		return nil, etcdErr.NewError(ecode, nodePath, mkV2Rev(resp.Header.Revision))
+		return nil, v2error.NewError(ecode, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 
 
 	createRev := resp.Header.Revision
 	createRev := resp.Header.Revision
-	var pn *store.NodeExtern
+	var pn *v2store.NodeExtern
 	if pkv := prevKeyFromPuts(resp); pkv != nil {
 	if pkv := prevKeyFromPuts(resp); pkv != nil {
 		pn = s.mkV2Node(pkv)
 		pn = s.mkV2Node(pkv)
 		createRev = pkv.CreateRevision
 		createRev = pkv.CreateRevision
@@ -185,9 +185,9 @@ func (s *v2v3Store) Set(
 	if dir {
 	if dir {
 		vp = nil
 		vp = nil
 	}
 	}
-	return &store.Event{
-		Action: store.Set,
-		Node: &store.NodeExtern{
+	return &v2store.Event{
+		Action: v2store.Set,
+		Node: &v2store.NodeExtern{
 			Key:           nodePath,
 			Key:           nodePath,
 			Value:         vp,
 			Value:         vp,
 			Dir:           dir,
 			Dir:           dir,
@@ -199,9 +199,9 @@ func (s *v2v3Store) Set(
 	}, nil
 	}, nil
 }
 }
 
 
-func (s *v2v3Store) Update(nodePath, newValue string, expireOpts store.TTLOptionSet) (*store.Event, error) {
+func (s *v2v3Store) Update(nodePath, newValue string, expireOpts v2store.TTLOptionSet) (*v2store.Event, error) {
 	if isRoot(nodePath) {
 	if isRoot(nodePath) {
-		return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, nodePath, 0)
+		return nil, v2error.NewError(v2error.EcodeRootROnly, nodePath, 0)
 	}
 	}
 
 
 	if expireOpts.Refresh || !expireOpts.ExpireTime.IsZero() {
 	if expireOpts.Refresh || !expireOpts.ExpireTime.IsZero() {
@@ -212,15 +212,15 @@ func (s *v2v3Store) Update(nodePath, newValue string, expireOpts store.TTLOption
 	ecode := 0
 	ecode := 0
 	applyf := func(stm concurrency.STM) error {
 	applyf := func(stm concurrency.STM) error {
 		if rev := stm.Rev(key + "/"); rev != 0 {
 		if rev := stm.Rev(key + "/"); rev != 0 {
-			ecode = etcdErr.EcodeNotFile
+			ecode = v2error.EcodeNotFile
 			return nil
 			return nil
 		}
 		}
 		if rev := stm.Rev(key); rev == 0 {
 		if rev := stm.Rev(key); rev == 0 {
-			ecode = etcdErr.EcodeKeyNotFound
+			ecode = v2error.EcodeKeyNotFound
 			return nil
 			return nil
 		}
 		}
 		stm.Put(key, newValue, clientv3.WithPrevKV())
 		stm.Put(key, newValue, clientv3.WithPrevKV())
-		stm.Put(s.mkActionKey(), store.Update)
+		stm.Put(s.mkActionKey(), v2store.Update)
 		return nil
 		return nil
 	}
 	}
 
 
@@ -229,13 +229,13 @@ func (s *v2v3Store) Update(nodePath, newValue string, expireOpts store.TTLOption
 		return nil, err
 		return nil, err
 	}
 	}
 	if ecode != 0 {
 	if ecode != 0 {
-		return nil, etcdErr.NewError(etcdErr.EcodeNotFile, nodePath, mkV2Rev(resp.Header.Revision))
+		return nil, v2error.NewError(v2error.EcodeNotFile, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 
 
 	pkv := prevKeyFromPuts(resp)
 	pkv := prevKeyFromPuts(resp)
-	return &store.Event{
-		Action: store.Update,
-		Node: &store.NodeExtern{
+	return &v2store.Event{
+		Action: v2store.Update,
+		Node: &v2store.NodeExtern{
 			Key:           nodePath,
 			Key:           nodePath,
 			Value:         &newValue,
 			Value:         &newValue,
 			ModifiedIndex: mkV2Rev(resp.Header.Revision),
 			ModifiedIndex: mkV2Rev(resp.Header.Revision),
@@ -251,10 +251,10 @@ func (s *v2v3Store) Create(
 	dir bool,
 	dir bool,
 	value string,
 	value string,
 	unique bool,
 	unique bool,
-	expireOpts store.TTLOptionSet,
-) (*store.Event, error) {
+	expireOpts v2store.TTLOptionSet,
+) (*v2store.Event, error) {
 	if isRoot(nodePath) {
 	if isRoot(nodePath) {
-		return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, nodePath, 0)
+		return nil, v2error.NewError(v2error.EcodeRootROnly, nodePath, 0)
 	}
 	}
 	if expireOpts.Refresh || !expireOpts.ExpireTime.IsZero() {
 	if expireOpts.Refresh || !expireOpts.ExpireTime.IsZero() {
 		return nil, errUnsupported
 		return nil, errUnsupported
@@ -275,7 +275,7 @@ func (s *v2v3Store) Create(
 			}
 			}
 		}
 		}
 		if stm.Rev(key) > 0 || stm.Rev(key+"/") > 0 {
 		if stm.Rev(key) > 0 || stm.Rev(key+"/") > 0 {
-			ecode = etcdErr.EcodeNodeExist
+			ecode = v2error.EcodeNodeExist
 			return nil
 			return nil
 		}
 		}
 		// build path if any directories in path do not exist
 		// build path if any directories in path do not exist
@@ -283,7 +283,7 @@ func (s *v2v3Store) Create(
 		for p := path.Dir(nodePath); !isRoot(p); p = path.Dir(p) {
 		for p := path.Dir(nodePath); !isRoot(p); p = path.Dir(p) {
 			pp := s.mkPath(p)
 			pp := s.mkPath(p)
 			if stm.Rev(pp) > 0 {
 			if stm.Rev(pp) > 0 {
-				ecode = etcdErr.EcodeNotDir
+				ecode = v2error.EcodeNotDir
 				return nil
 				return nil
 			}
 			}
 			if stm.Rev(pp+"/") == 0 {
 			if stm.Rev(pp+"/") == 0 {
@@ -299,7 +299,7 @@ func (s *v2v3Store) Create(
 			key += "/"
 			key += "/"
 		}
 		}
 		stm.Put(key, value)
 		stm.Put(key, value)
-		stm.Put(s.mkActionKey(), store.Create)
+		stm.Put(s.mkActionKey(), v2store.Create)
 		return nil
 		return nil
 	}
 	}
 
 
@@ -308,7 +308,7 @@ func (s *v2v3Store) Create(
 		return nil, err
 		return nil, err
 	}
 	}
 	if ecode != 0 {
 	if ecode != 0 {
-		return nil, etcdErr.NewError(ecode, nodePath, mkV2Rev(resp.Header.Revision))
+		return nil, v2error.NewError(ecode, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 
 
 	var v *string
 	var v *string
@@ -316,9 +316,9 @@ func (s *v2v3Store) Create(
 		v = &value
 		v = &value
 	}
 	}
 
 
-	return &store.Event{
-		Action: store.Create,
-		Node: &store.NodeExtern{
+	return &v2store.Event{
+		Action: v2store.Create,
+		Node: &v2store.NodeExtern{
 			Key:           nodePath,
 			Key:           nodePath,
 			Value:         v,
 			Value:         v,
 			Dir:           dir,
 			Dir:           dir,
@@ -334,10 +334,10 @@ func (s *v2v3Store) CompareAndSwap(
 	prevValue string,
 	prevValue string,
 	prevIndex uint64,
 	prevIndex uint64,
 	value string,
 	value string,
-	expireOpts store.TTLOptionSet,
-) (*store.Event, error) {
+	expireOpts v2store.TTLOptionSet,
+) (*v2store.Event, error) {
 	if isRoot(nodePath) {
 	if isRoot(nodePath) {
-		return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, nodePath, 0)
+		return nil, v2error.NewError(v2error.EcodeRootROnly, nodePath, 0)
 	}
 	}
 	if expireOpts.Refresh || !expireOpts.ExpireTime.IsZero() {
 	if expireOpts.Refresh || !expireOpts.ExpireTime.IsZero() {
 		return nil, errUnsupported
 		return nil, errUnsupported
@@ -348,7 +348,7 @@ func (s *v2v3Store) CompareAndSwap(
 		s.mkCompare(nodePath, prevValue, prevIndex)...,
 		s.mkCompare(nodePath, prevValue, prevIndex)...,
 	).Then(
 	).Then(
 		clientv3.OpPut(key, value, clientv3.WithPrevKV()),
 		clientv3.OpPut(key, value, clientv3.WithPrevKV()),
-		clientv3.OpPut(s.mkActionKey(), store.CompareAndSwap),
+		clientv3.OpPut(s.mkActionKey(), v2store.CompareAndSwap),
 	).Else(
 	).Else(
 		clientv3.OpGet(key),
 		clientv3.OpGet(key),
 		clientv3.OpGet(key+"/"),
 		clientv3.OpGet(key+"/"),
@@ -362,9 +362,9 @@ func (s *v2v3Store) CompareAndSwap(
 	}
 	}
 
 
 	pkv := resp.Responses[0].GetResponsePut().PrevKv
 	pkv := resp.Responses[0].GetResponsePut().PrevKv
-	return &store.Event{
-		Action: store.CompareAndSwap,
-		Node: &store.NodeExtern{
+	return &v2store.Event{
+		Action: v2store.CompareAndSwap,
+		Node: &v2store.NodeExtern{
 			Key:           nodePath,
 			Key:           nodePath,
 			Value:         &value,
 			Value:         &value,
 			CreatedIndex:  mkV2Rev(pkv.CreateRevision),
 			CreatedIndex:  mkV2Rev(pkv.CreateRevision),
@@ -375,9 +375,9 @@ func (s *v2v3Store) CompareAndSwap(
 	}, nil
 	}, nil
 }
 }
 
 
-func (s *v2v3Store) Delete(nodePath string, dir, recursive bool) (*store.Event, error) {
+func (s *v2v3Store) Delete(nodePath string, dir, recursive bool) (*v2store.Event, error) {
 	if isRoot(nodePath) {
 	if isRoot(nodePath) {
-		return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, nodePath, 0)
+		return nil, v2error.NewError(v2error.EcodeRootROnly, nodePath, 0)
 	}
 	}
 	if !dir && !recursive {
 	if !dir && !recursive {
 		return s.deleteNode(nodePath)
 		return s.deleteNode(nodePath)
@@ -391,7 +391,7 @@ func (s *v2v3Store) Delete(nodePath string, dir, recursive bool) (*store.Event,
 	for i := 1; i < maxPathDepth; i++ {
 	for i := 1; i < maxPathDepth; i++ {
 		dels[i] = clientv3.OpDelete(s.mkPathDepth(nodePath, i), clientv3.WithPrefix())
 		dels[i] = clientv3.OpDelete(s.mkPathDepth(nodePath, i), clientv3.WithPrefix())
 	}
 	}
-	dels[maxPathDepth] = clientv3.OpPut(s.mkActionKey(), store.Delete)
+	dels[maxPathDepth] = clientv3.OpPut(s.mkActionKey(), v2store.Delete)
 
 
 	resp, err := s.c.Txn(s.ctx).If(
 	resp, err := s.c.Txn(s.ctx).If(
 		clientv3.Compare(clientv3.Version(s.mkPath(nodePath)+"/"), ">", 0),
 		clientv3.Compare(clientv3.Version(s.mkPath(nodePath)+"/"), ">", 0),
@@ -403,61 +403,61 @@ func (s *v2v3Store) Delete(nodePath string, dir, recursive bool) (*store.Event,
 		return nil, err
 		return nil, err
 	}
 	}
 	if !resp.Succeeded {
 	if !resp.Succeeded {
-		return nil, etcdErr.NewError(etcdErr.EcodeNodeExist, nodePath, mkV2Rev(resp.Header.Revision))
+		return nil, v2error.NewError(v2error.EcodeNodeExist, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 	dresp := resp.Responses[0].GetResponseDeleteRange()
 	dresp := resp.Responses[0].GetResponseDeleteRange()
-	return &store.Event{
-		Action:    store.Delete,
+	return &v2store.Event{
+		Action:    v2store.Delete,
 		PrevNode:  s.mkV2Node(dresp.PrevKvs[0]),
 		PrevNode:  s.mkV2Node(dresp.PrevKvs[0]),
 		EtcdIndex: mkV2Rev(resp.Header.Revision),
 		EtcdIndex: mkV2Rev(resp.Header.Revision),
 	}, nil
 	}, nil
 }
 }
 
 
-func (s *v2v3Store) deleteEmptyDir(nodePath string) (*store.Event, error) {
+func (s *v2v3Store) deleteEmptyDir(nodePath string) (*v2store.Event, error) {
 	resp, err := s.c.Txn(s.ctx).If(
 	resp, err := s.c.Txn(s.ctx).If(
 		clientv3.Compare(clientv3.Version(s.mkPathDepth(nodePath, 1)), "=", 0).WithPrefix(),
 		clientv3.Compare(clientv3.Version(s.mkPathDepth(nodePath, 1)), "=", 0).WithPrefix(),
 	).Then(
 	).Then(
 		clientv3.OpDelete(s.mkPath(nodePath)+"/", clientv3.WithPrevKV()),
 		clientv3.OpDelete(s.mkPath(nodePath)+"/", clientv3.WithPrevKV()),
-		clientv3.OpPut(s.mkActionKey(), store.Delete),
+		clientv3.OpPut(s.mkActionKey(), v2store.Delete),
 	).Commit()
 	).Commit()
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
 	if !resp.Succeeded {
 	if !resp.Succeeded {
-		return nil, etcdErr.NewError(etcdErr.EcodeDirNotEmpty, nodePath, mkV2Rev(resp.Header.Revision))
+		return nil, v2error.NewError(v2error.EcodeDirNotEmpty, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 	dresp := resp.Responses[0].GetResponseDeleteRange()
 	dresp := resp.Responses[0].GetResponseDeleteRange()
 	if len(dresp.PrevKvs) == 0 {
 	if len(dresp.PrevKvs) == 0 {
-		return nil, etcdErr.NewError(etcdErr.EcodeNodeExist, nodePath, mkV2Rev(resp.Header.Revision))
+		return nil, v2error.NewError(v2error.EcodeNodeExist, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
-	return &store.Event{
-		Action:    store.Delete,
+	return &v2store.Event{
+		Action:    v2store.Delete,
 		PrevNode:  s.mkV2Node(dresp.PrevKvs[0]),
 		PrevNode:  s.mkV2Node(dresp.PrevKvs[0]),
 		EtcdIndex: mkV2Rev(resp.Header.Revision),
 		EtcdIndex: mkV2Rev(resp.Header.Revision),
 	}, nil
 	}, nil
 }
 }
 
 
-func (s *v2v3Store) deleteNode(nodePath string) (*store.Event, error) {
+func (s *v2v3Store) deleteNode(nodePath string) (*v2store.Event, error) {
 	resp, err := s.c.Txn(s.ctx).If(
 	resp, err := s.c.Txn(s.ctx).If(
 		clientv3.Compare(clientv3.Version(s.mkPath(nodePath)+"/"), "=", 0),
 		clientv3.Compare(clientv3.Version(s.mkPath(nodePath)+"/"), "=", 0),
 	).Then(
 	).Then(
 		clientv3.OpDelete(s.mkPath(nodePath), clientv3.WithPrevKV()),
 		clientv3.OpDelete(s.mkPath(nodePath), clientv3.WithPrevKV()),
-		clientv3.OpPut(s.mkActionKey(), store.Delete),
+		clientv3.OpPut(s.mkActionKey(), v2store.Delete),
 	).Commit()
 	).Commit()
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
 	if !resp.Succeeded {
 	if !resp.Succeeded {
-		return nil, etcdErr.NewError(etcdErr.EcodeNotFile, nodePath, mkV2Rev(resp.Header.Revision))
+		return nil, v2error.NewError(v2error.EcodeNotFile, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 	pkvs := resp.Responses[0].GetResponseDeleteRange().PrevKvs
 	pkvs := resp.Responses[0].GetResponseDeleteRange().PrevKvs
 	if len(pkvs) == 0 {
 	if len(pkvs) == 0 {
-		return nil, etcdErr.NewError(etcdErr.EcodeKeyNotFound, nodePath, mkV2Rev(resp.Header.Revision))
+		return nil, v2error.NewError(v2error.EcodeKeyNotFound, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 	pkv := pkvs[0]
 	pkv := pkvs[0]
-	return &store.Event{
-		Action: store.Delete,
-		Node: &store.NodeExtern{
+	return &v2store.Event{
+		Action: v2store.Delete,
+		Node: &v2store.NodeExtern{
 			Key:           nodePath,
 			Key:           nodePath,
 			CreatedIndex:  mkV2Rev(pkv.CreateRevision),
 			CreatedIndex:  mkV2Rev(pkv.CreateRevision),
 			ModifiedIndex: mkV2Rev(resp.Header.Revision),
 			ModifiedIndex: mkV2Rev(resp.Header.Revision),
@@ -467,9 +467,9 @@ func (s *v2v3Store) deleteNode(nodePath string) (*store.Event, error) {
 	}, nil
 	}, nil
 }
 }
 
 
-func (s *v2v3Store) CompareAndDelete(nodePath, prevValue string, prevIndex uint64) (*store.Event, error) {
+func (s *v2v3Store) CompareAndDelete(nodePath, prevValue string, prevIndex uint64) (*v2store.Event, error) {
 	if isRoot(nodePath) {
 	if isRoot(nodePath) {
-		return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, nodePath, 0)
+		return nil, v2error.NewError(v2error.EcodeRootROnly, nodePath, 0)
 	}
 	}
 
 
 	key := s.mkPath(nodePath)
 	key := s.mkPath(nodePath)
@@ -477,7 +477,7 @@ func (s *v2v3Store) CompareAndDelete(nodePath, prevValue string, prevIndex uint6
 		s.mkCompare(nodePath, prevValue, prevIndex)...,
 		s.mkCompare(nodePath, prevValue, prevIndex)...,
 	).Then(
 	).Then(
 		clientv3.OpDelete(key, clientv3.WithPrevKV()),
 		clientv3.OpDelete(key, clientv3.WithPrevKV()),
-		clientv3.OpPut(s.mkActionKey(), store.CompareAndDelete),
+		clientv3.OpPut(s.mkActionKey(), v2store.CompareAndDelete),
 	).Else(
 	).Else(
 		clientv3.OpGet(key),
 		clientv3.OpGet(key),
 		clientv3.OpGet(key+"/"),
 		clientv3.OpGet(key+"/"),
@@ -492,9 +492,9 @@ func (s *v2v3Store) CompareAndDelete(nodePath, prevValue string, prevIndex uint6
 
 
 	// len(pkvs) > 1 since txn only succeeds when key exists
 	// len(pkvs) > 1 since txn only succeeds when key exists
 	pkv := resp.Responses[0].GetResponseDeleteRange().PrevKvs[0]
 	pkv := resp.Responses[0].GetResponseDeleteRange().PrevKvs[0]
-	return &store.Event{
-		Action: store.CompareAndDelete,
-		Node: &store.NodeExtern{
+	return &v2store.Event{
+		Action: v2store.CompareAndDelete,
+		Node: &v2store.NodeExtern{
 			Key:           nodePath,
 			Key:           nodePath,
 			CreatedIndex:  mkV2Rev(pkv.CreateRevision),
 			CreatedIndex:  mkV2Rev(pkv.CreateRevision),
 			ModifiedIndex: mkV2Rev(resp.Header.Revision),
 			ModifiedIndex: mkV2Rev(resp.Header.Revision),
@@ -506,11 +506,11 @@ func (s *v2v3Store) CompareAndDelete(nodePath, prevValue string, prevIndex uint6
 
 
 func compareFail(nodePath, prevValue string, prevIndex uint64, resp *clientv3.TxnResponse) error {
 func compareFail(nodePath, prevValue string, prevIndex uint64, resp *clientv3.TxnResponse) error {
 	if dkvs := resp.Responses[1].GetResponseRange().Kvs; len(dkvs) > 0 {
 	if dkvs := resp.Responses[1].GetResponseRange().Kvs; len(dkvs) > 0 {
-		return etcdErr.NewError(etcdErr.EcodeNotFile, nodePath, mkV2Rev(resp.Header.Revision))
+		return v2error.NewError(v2error.EcodeNotFile, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 	kvs := resp.Responses[0].GetResponseRange().Kvs
 	kvs := resp.Responses[0].GetResponseRange().Kvs
 	if len(kvs) == 0 {
 	if len(kvs) == 0 {
-		return etcdErr.NewError(etcdErr.EcodeKeyNotFound, nodePath, mkV2Rev(resp.Header.Revision))
+		return v2error.NewError(v2error.EcodeKeyNotFound, nodePath, mkV2Rev(resp.Header.Revision))
 	}
 	}
 	kv := kvs[0]
 	kv := kvs[0]
 	indexMatch := (prevIndex == 0 || kv.ModRevision == int64(prevIndex))
 	indexMatch := (prevIndex == 0 || kv.ModRevision == int64(prevIndex))
@@ -524,7 +524,7 @@ func compareFail(nodePath, prevValue string, prevIndex uint64, resp *clientv3.Tx
 	default:
 	default:
 		cause = fmt.Sprintf("[%v != %v] [%v != %v]", prevValue, string(kv.Value), prevIndex, kv.ModRevision)
 		cause = fmt.Sprintf("[%v != %v] [%v != %v]", prevValue, string(kv.Value), prevIndex, kv.ModRevision)
 	}
 	}
-	return etcdErr.NewError(etcdErr.EcodeTestFailed, cause, mkV2Rev(resp.Header.Revision))
+	return v2error.NewError(v2error.EcodeTestFailed, cause, mkV2Rev(resp.Header.Revision))
 }
 }
 
 
 func (s *v2v3Store) mkCompare(nodePath, prevValue string, prevIndex uint64) []clientv3.Cmp {
 func (s *v2v3Store) mkCompare(nodePath, prevValue string, prevIndex uint64) []clientv3.Cmp {
@@ -548,7 +548,7 @@ func (s *v2v3Store) Version() int { return 2 }
 
 
 func (s *v2v3Store) Save() ([]byte, error)       { panic("STUB") }
 func (s *v2v3Store) Save() ([]byte, error)       { panic("STUB") }
 func (s *v2v3Store) Recovery(state []byte) error { panic("STUB") }
 func (s *v2v3Store) Recovery(state []byte) error { panic("STUB") }
-func (s *v2v3Store) Clone() store.Store          { panic("STUB") }
+func (s *v2v3Store) Clone() v2store.Store        { panic("STUB") }
 func (s *v2v3Store) SaveNoCopy() ([]byte, error) { panic("STUB") }
 func (s *v2v3Store) SaveNoCopy() ([]byte, error) { panic("STUB") }
 func (s *v2v3Store) HasTTLKeys() bool            { panic("STUB") }
 func (s *v2v3Store) HasTTLKeys() bool            { panic("STUB") }
 
 
@@ -586,11 +586,11 @@ func mkV3Rev(v2Rev uint64) int64 {
 }
 }
 
 
 // mkV2Node creates a V2 NodeExtern from a V3 KeyValue
 // mkV2Node creates a V2 NodeExtern from a V3 KeyValue
-func (s *v2v3Store) mkV2Node(kv *mvccpb.KeyValue) *store.NodeExtern {
+func (s *v2v3Store) mkV2Node(kv *mvccpb.KeyValue) *v2store.NodeExtern {
 	if kv == nil {
 	if kv == nil {
 		return nil
 		return nil
 	}
 	}
-	n := &store.NodeExtern{
+	n := &v2store.NodeExtern{
 		Key:           string(s.mkNodePath(string(kv.Key))),
 		Key:           string(s.mkNodePath(string(kv.Key))),
 		Dir:           kv.Key[len(kv.Key)-1] == '/',
 		Dir:           kv.Key[len(kv.Key)-1] == '/',
 		CreatedIndex:  mkV2Rev(kv.CreateRevision),
 		CreatedIndex:  mkV2Rev(kv.CreateRevision),

+ 9 - 9
etcdserver/api/v2v3/watcher.go

@@ -19,11 +19,11 @@ import (
 	"strings"
 	"strings"
 
 
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3"
-	etcdErr "github.com/coreos/etcd/error"
-	"github.com/coreos/etcd/internal/store"
+	"github.com/coreos/etcd/etcdserver/v2error"
+	"github.com/coreos/etcd/etcdserver/v2store"
 )
 )
 
 
-func (s *v2v3Store) Watch(prefix string, recursive, stream bool, sinceIndex uint64) (store.Watcher, error) {
+func (s *v2v3Store) Watch(prefix string, recursive, stream bool, sinceIndex uint64) (v2store.Watcher, error) {
 	ctx, cancel := context.WithCancel(s.ctx)
 	ctx, cancel := context.WithCancel(s.ctx)
 	wch := s.c.Watch(
 	wch := s.c.Watch(
 		ctx,
 		ctx,
@@ -36,10 +36,10 @@ func (s *v2v3Store) Watch(prefix string, recursive, stream bool, sinceIndex uint
 	resp, ok := <-wch
 	resp, ok := <-wch
 	if err := resp.Err(); err != nil || !ok {
 	if err := resp.Err(); err != nil || !ok {
 		cancel()
 		cancel()
-		return nil, etcdErr.NewError(etcdErr.EcodeRaftInternal, prefix, 0)
+		return nil, v2error.NewError(v2error.EcodeRaftInternal, prefix, 0)
 	}
 	}
 
 
-	evc, donec := make(chan *store.Event), make(chan struct{})
+	evc, donec := make(chan *v2store.Event), make(chan struct{})
 	go func() {
 	go func() {
 		defer func() {
 		defer func() {
 			close(evc)
 			close(evc)
@@ -82,7 +82,7 @@ func (s *v2v3Store) Watch(prefix string, recursive, stream bool, sinceIndex uint
 	}, nil
 	}, nil
 }
 }
 
 
-func (s *v2v3Store) mkV2Events(wr clientv3.WatchResponse) (evs []*store.Event) {
+func (s *v2v3Store) mkV2Events(wr clientv3.WatchResponse) (evs []*v2store.Event) {
 	ak := s.mkActionKey()
 	ak := s.mkActionKey()
 	for _, rev := range mkRevs(wr) {
 	for _, rev := range mkRevs(wr) {
 		var act, key *clientv3.Event
 		var act, key *clientv3.Event
@@ -97,7 +97,7 @@ func (s *v2v3Store) mkV2Events(wr clientv3.WatchResponse) (evs []*store.Event) {
 				key = ev
 				key = ev
 			}
 			}
 		}
 		}
-		v2ev := &store.Event{
+		v2ev := &v2store.Event{
 			Action:    string(act.Kv.Value),
 			Action:    string(act.Kv.Value),
 			Node:      s.mkV2Node(key.Kv),
 			Node:      s.mkV2Node(key.Kv),
 			PrevNode:  s.mkV2Node(key.PrevKv),
 			PrevNode:  s.mkV2Node(key.PrevKv),
@@ -125,7 +125,7 @@ func mkRevs(wr clientv3.WatchResponse) (revs [][]*clientv3.Event) {
 
 
 type v2v3Watcher struct {
 type v2v3Watcher struct {
 	startRev int64
 	startRev int64
-	evc      chan *store.Event
+	evc      chan *v2store.Event
 	donec    chan struct{}
 	donec    chan struct{}
 	cancel   context.CancelFunc
 	cancel   context.CancelFunc
 }
 }
@@ -137,4 +137,4 @@ func (w *v2v3Watcher) Remove() {
 	<-w.donec
 	<-w.donec
 }
 }
 
 
-func (w *v2v3Watcher) EventChan() chan *store.Event { return w.evc }
+func (w *v2v3Watcher) EventChan() chan *v2store.Event { return w.evc }

+ 35 - 35
etcdserver/api/v3election/v3electionpb/v3election.pb.go

@@ -31,7 +31,7 @@ import (
 
 
 	etcdserverpb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	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"
 	context "golang.org/x/net/context"
 
 
@@ -2041,39 +2041,39 @@ var (
 func init() { proto.RegisterFile("v3election.proto", fileDescriptorV3Election) }
 func init() { proto.RegisterFile("v3election.proto", fileDescriptorV3Election) }
 
 
 var fileDescriptorV3Election = []byte{
 var fileDescriptorV3Election = []byte{
-	// 541 bytes of a gzipped FileDescriptorProto
+	// 535 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcf, 0x6e, 0xd3, 0x40,
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcf, 0x6e, 0xd3, 0x40,
-	0x10, 0xc6, 0x59, 0xa7, 0x84, 0x32, 0xa4, 0xad, 0x65, 0x82, 0x08, 0x21, 0x98, 0x68, 0x91, 0x50,
-	0x95, 0x83, 0x17, 0x35, 0x9c, 0x72, 0x42, 0x20, 0x50, 0xa5, 0x22, 0x01, 0x3e, 0x20, 0x38, 0x6e,
-	0xdc, 0x91, 0x1b, 0xd9, 0xf1, 0x1a, 0xdb, 0xb5, 0x94, 0x2b, 0xaf, 0xc0, 0x01, 0x1e, 0x89, 0x23,
-	0x12, 0x2f, 0x80, 0x02, 0x0f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 0x64, 0x8e,
+	0xb1, 0x15, 0xa6, 0x4f, 0x6f, 0xd7, 0x30, 0xfa, 0xa2, 0x24, 0xc4, 0x87, 0x1b, 0xaf, 0x67, 0x6a,
+	0xe0, 0xbb, 0x50, 0x1e, 0x28, 0xca, 0x11, 0xed, 0xd5, 0x28, 0x42, 0x17, 0x9e, 0x92, 0xf1, 0x63,
+	0x22, 0xdd, 0xe8, 0x05, 0x6d, 0x72, 0x6a, 0x8b, 0xdf, 0xe4, 0xd4, 0x77, 0x7a, 0x8b, 0x9b, 0x58,
+	0x89, 0xa6, 0x64, 0xfc, 0xcc, 0xfc, 0xb6, 0xb6, 0xc9, 0xf7, 0xb5, 0x4d, 0x7e, 0xae, 0x6d, 0xf2,
+	0xf5, 0x97, 0x7d, 0x6d, 0xd6, 0x51, 0x7f, 0x8c, 0x93, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2f,
+	0x1d, 0xfa, 0x11, 0xb1, 0x05, 0x00, 0x00,
 }
 }

+ 1 - 1
etcdserver/api/v3election/v3electionpb/v3election.proto

@@ -3,7 +3,7 @@ package v3electionpb;
 
 
 import "gogoproto/gogo.proto";
 import "gogoproto/gogo.proto";
 import "etcd/etcdserver/etcdserverpb/rpc.proto";
 import "etcd/etcdserver/etcdserverpb/rpc.proto";
-import "etcd/internal/mvcc/mvccpb/kv.proto";
+import "etcd/mvcc/mvccpb/kv.proto";
 
 
 // for grpc-gateway
 // for grpc-gateway
 import "google/api/annotations.proto";
 import "google/api/annotations.proto";

+ 1 - 1
etcdserver/api/v3rpc/lease.go

@@ -21,7 +21,7 @@ import (
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/lease"
+	"github.com/coreos/etcd/lease"
 )
 )
 
 
 type LeaseServer struct {
 type LeaseServer struct {

+ 4 - 4
etcdserver/api/v3rpc/maintenance.go

@@ -19,15 +19,15 @@ import (
 	"crypto/sha256"
 	"crypto/sha256"
 	"io"
 	"io"
 
 
+	"github.com/coreos/etcd/auth"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/auth"
-	"github.com/coreos/etcd/internal/mvcc"
-	"github.com/coreos/etcd/internal/mvcc/backend"
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/mvcc"
+	"github.com/coreos/etcd/mvcc/backend"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft"
+	"github.com/coreos/etcd/version"
 )
 )
 
 
 type KVGetter interface {
 type KVGetter interface {

+ 3 - 3
etcdserver/api/v3rpc/util.go

@@ -18,12 +18,12 @@ import (
 	"context"
 	"context"
 	"strings"
 	"strings"
 
 
+	"github.com/coreos/etcd/auth"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/membership"
-	"github.com/coreos/etcd/internal/auth"
-	"github.com/coreos/etcd/internal/lease"
-	"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/codes"
 	"google.golang.org/grpc/status"
 	"google.golang.org/grpc/status"

+ 1 - 1
etcdserver/api/v3rpc/util_test.go

@@ -20,7 +20,7 @@ import (
 	"testing"
 	"testing"
 
 
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"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/codes"
 	"google.golang.org/grpc/status"
 	"google.golang.org/grpc/status"

+ 3 - 3
etcdserver/api/v3rpc/watch.go

@@ -21,12 +21,12 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"time"
 
 
+	"github.com/coreos/etcd/auth"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/auth"
-	"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 {
 type watchServer struct {

+ 4 - 4
etcdserver/apply.go

@@ -20,11 +20,11 @@ import (
 	"sort"
 	"sort"
 	"time"
 	"time"
 
 
+	"github.com/coreos/etcd/auth"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/auth"
-	"github.com/coreos/etcd/internal/lease"
-	"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/coreos/etcd/pkg/types"
 
 
 	"github.com/gogo/protobuf/proto"
 	"github.com/gogo/protobuf/proto"

+ 3 - 3
etcdserver/apply_auth.go

@@ -17,10 +17,10 @@ package etcdserver
 import (
 import (
 	"sync"
 	"sync"
 
 
+	"github.com/coreos/etcd/auth"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/auth"
-	"github.com/coreos/etcd/internal/lease"
-	"github.com/coreos/etcd/internal/mvcc"
+	"github.com/coreos/etcd/lease"
+	"github.com/coreos/etcd/mvcc"
 )
 )
 
 
 type authApplierV3 struct {
 type authApplierV3 struct {

+ 9 - 8
etcdserver/apply_v2.go

@@ -21,8 +21,9 @@ import (
 
 
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/membership"
-	"github.com/coreos/etcd/internal/store"
+	"github.com/coreos/etcd/etcdserver/v2store"
 	"github.com/coreos/etcd/pkg/pbutil"
 	"github.com/coreos/etcd/pkg/pbutil"
+
 	"github.com/coreos/go-semver/semver"
 	"github.com/coreos/go-semver/semver"
 )
 )
 
 
@@ -35,12 +36,12 @@ type ApplierV2 interface {
 	Sync(r *RequestV2) Response
 	Sync(r *RequestV2) Response
 }
 }
 
 
-func NewApplierV2(s store.Store, c *membership.RaftCluster) ApplierV2 {
+func NewApplierV2(s v2store.Store, c *membership.RaftCluster) ApplierV2 {
 	return &applierV2store{store: s, cluster: c}
 	return &applierV2store{store: s, cluster: c}
 }
 }
 
 
 type applierV2store struct {
 type applierV2store struct {
-	store   store.Store
+	store   v2store.Store
 	cluster *membership.RaftCluster
 	cluster *membership.RaftCluster
 }
 }
 
 
@@ -104,8 +105,8 @@ func (a *applierV2store) Sync(r *RequestV2) Response {
 	return Response{}
 	return Response{}
 }
 }
 
 
-// applyV2Request interprets r as a call to store.X and returns a Response interpreted
-// from store.Event
+// applyV2Request interprets r as a call to v2store.X
+// and returns a Response interpreted from v2store.Event
 func (s *EtcdServer) applyV2Request(r *RequestV2) Response {
 func (s *EtcdServer) applyV2Request(r *RequestV2) Response {
 	defer warnOfExpensiveRequest(time.Now(), r)
 	defer warnOfExpensiveRequest(time.Now(), r)
 
 
@@ -126,15 +127,15 @@ func (s *EtcdServer) applyV2Request(r *RequestV2) Response {
 	}
 	}
 }
 }
 
 
-func (r *RequestV2) TTLOptions() store.TTLOptionSet {
+func (r *RequestV2) TTLOptions() v2store.TTLOptionSet {
 	refresh, _ := pbutil.GetBool(r.Refresh)
 	refresh, _ := pbutil.GetBool(r.Refresh)
-	ttlOptions := store.TTLOptionSet{Refresh: refresh}
+	ttlOptions := v2store.TTLOptionSet{Refresh: refresh}
 	if r.Expiration != 0 {
 	if r.Expiration != 0 {
 		ttlOptions.ExpireTime = time.Unix(0, r.Expiration)
 		ttlOptions.ExpireTime = time.Unix(0, r.Expiration)
 	}
 	}
 	return ttlOptions
 	return ttlOptions
 }
 }
 
 
-func toResponse(ev *store.Event, err error) Response {
+func toResponse(ev *v2store.Event, err error) Response {
 	return Response{Event: ev, Err: err}
 	return Response{Event: ev, Err: err}
 }
 }

+ 4 - 4
etcdserver/backend.go

@@ -19,11 +19,11 @@ import (
 	"os"
 	"os"
 	"time"
 	"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/lease"
+	"github.com/coreos/etcd/mvcc"
+	"github.com/coreos/etcd/mvcc/backend"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
+	"github.com/coreos/etcd/raftsnap"
 )
 )
 
 
 func newBackend(cfg ServerConfig) backend.Backend {
 func newBackend(cfg ServerConfig) backend.Backend {

+ 1 - 1
etcdserver/cluster_util.go

@@ -23,8 +23,8 @@ import (
 	"time"
 	"time"
 
 
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/membership"
-	"github.com/coreos/etcd/internal/version"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/coreos/go-semver/semver"
 	"github.com/coreos/go-semver/semver"
 )
 )

+ 1 - 1
etcdserver/cluster_util_test.go

@@ -18,8 +18,8 @@ import (
 	"reflect"
 	"reflect"
 	"testing"
 	"testing"
 
 
-	"github.com/coreos/etcd/internal/version"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/coreos/go-semver/semver"
 	"github.com/coreos/go-semver/semver"
 )
 )

+ 1 - 1
etcdserver/corrupt.go

@@ -22,7 +22,7 @@ import (
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/mvcc"
+	"github.com/coreos/etcd/mvcc"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 )
 )
 
 

+ 226 - 226
etcdserver/etcdserverpb/rpc.pb.go

@@ -12,9 +12,9 @@ import (
 
 
 	_ "github.com/gogo/protobuf/gogoproto"
 	_ "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"
+	authpb "github.com/coreos/etcd/auth/authpb"
 
 
 	context "golang.org/x/net/context"
 	context "golang.org/x/net/context"
 
 
@@ -18602,7 +18602,7 @@ var (
 func init() { proto.RegisterFile("rpc.proto", fileDescriptorRpc) }
 func init() { proto.RegisterFile("rpc.proto", fileDescriptorRpc) }
 
 
 var fileDescriptorRpc = []byte{
 var fileDescriptorRpc = []byte{
-	// 3712 bytes of a gzipped FileDescriptorProto
+	// 3705 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x5b, 0xdd, 0x6f, 0x1b, 0xc7,
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x5b, 0xdd, 0x6f, 0x1b, 0xc7,
 	0x76, 0xd7, 0x92, 0xe2, 0xd7, 0xe1, 0x87, 0xa8, 0x91, 0x64, 0xd3, 0xb4, 0x2d, 0xcb, 0x63, 0x3b,
 	0x76, 0xd7, 0x92, 0xe2, 0xd7, 0xe1, 0x87, 0xa8, 0x91, 0x64, 0xd3, 0xb4, 0x2d, 0xcb, 0x63, 0x3b,
 	0x56, 0xec, 0x44, 0xbc, 0x57, 0xf7, 0xb6, 0x0f, 0x6e, 0x71, 0x71, 0x65, 0x89, 0xd7, 0xd2, 0x95,
 	0x56, 0xec, 0x44, 0xbc, 0x57, 0xf7, 0xb6, 0x0f, 0x6e, 0x71, 0x71, 0x65, 0x89, 0xd7, 0xd2, 0x95,
@@ -18612,227 +18612,227 @@ var fileDescriptorRpc = []byte{
 	0x2f, 0x2e, 0xe6, 0x6b, 0x77, 0xf6, 0x4b, 0x72, 0xc2, 0x24, 0x2f, 0xf2, 0xce, 0x99, 0x33, 0xe7,
 	0x2f, 0x2e, 0xe6, 0x6b, 0x77, 0xf6, 0x4b, 0x72, 0xc2, 0x24, 0x2f, 0xf2, 0xce, 0x99, 0x33, 0xe7,
 	0x77, 0xe6, 0xcc, 0xcc, 0x39, 0x67, 0xce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 0x6d, 0xd2, 0xc6, 0x8f, 0xd4, 0x59, 0x12, 0x36, 0xbe, 0x63, 0xf7, 0x89, 0x72, 0xcc,
+	0x44, 0x2d, 0x25, 0x0d, 0xed, 0xea, 0x63, 0x16, 0x29, 0xc4, 0xa4, 0xa1, 0x05, 0xc7, 0x4c, 0x16,
+	0x51, 0x50, 0x8a, 0xb0, 0x6b, 0x8e, 0x59, 0xb4, 0x06, 0x93, 0x70, 0xcc, 0x18, 0xa0, 0x72, 0xcc,
+	0x82, 0x72, 0x47, 0xd2, 0x31, 0x8b, 0xd5, 0xa0, 0x93, 0x8e, 0x59, 0xbc, 0x62, 0x92, 0xb0, 0x8e,
+	0x0c, 0x37, 0x74, 0xcc, 0xe6, 0x12, 0x2a, 0x23, 0xe8, 0xbd, 0x14, 0x23, 0x26, 0x96, 0xb6, 0x9b,
+	0xef, 0xbf, 0x25, 0x77, 0xea, 0x1e, 0xe7, 0xe6, 0x97, 0x7b, 0xfc, 0x1f, 0x34, 0x98, 0x4f, 0xaa,
+	0xaa, 0xa0, 0x14, 0x9c, 0x94, 0x92, 0x78, 0x73, 0xe5, 0x6d, 0xd9, 0xaf, 0xb6, 0x96, 0xbf, 0xeb,
+	0x9f, 0xd7, 0xff, 0xf3, 0xcd, 0xa2, 0xf6, 0xdf, 0x6f, 0x16, 0xb5, 0xff, 0x7d, 0xb3, 0xa8, 0xfd,
+	0xe3, 0xff, 0x2d, 0x4e, 0x1d, 0xe7, 0xd9, 0x7f, 0xe4, 0xfa, 0xd5, 0x1f, 0x02, 0x00, 0x00, 0xff,
+	0xff, 0xbf, 0x57, 0x39, 0x98, 0x4f, 0x36, 0x00, 0x00,
 }
 }

+ 2 - 2
etcdserver/etcdserverpb/rpc.proto

@@ -2,8 +2,8 @@ syntax = "proto3";
 package etcdserverpb;
 package etcdserverpb;
 
 
 import "gogoproto/gogo.proto";
 import "gogoproto/gogo.proto";
-import "etcd/internal/mvcc/mvccpb/kv.proto";
-import "etcd/internal/auth/authpb/auth.proto";
+import "etcd/mvcc/mvccpb/kv.proto";
+import "etcd/auth/authpb/auth.proto";
 
 
 // for grpc-gateway
 // for grpc-gateway
 import "google/api/annotations.proto";
 import "google/api/annotations.proto";

+ 21 - 21
etcdserver/membership/cluster.go

@@ -27,13 +27,13 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"time"
 
 
-	"github.com/coreos/etcd/internal/mvcc/backend"
-	"github.com/coreos/etcd/internal/store"
-	"github.com/coreos/etcd/internal/version"
+	"github.com/coreos/etcd/etcdserver/v2store"
+	"github.com/coreos/etcd/mvcc/backend"
 	"github.com/coreos/etcd/pkg/netutil"
 	"github.com/coreos/etcd/pkg/netutil"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/coreos/go-semver/semver"
 	"github.com/coreos/go-semver/semver"
 )
 )
@@ -43,8 +43,8 @@ type RaftCluster struct {
 	id    types.ID
 	id    types.ID
 	token string
 	token string
 
 
-	store store.Store
-	be    backend.Backend
+	v2store v2store.Store
+	be      backend.Backend
 
 
 	sync.Mutex // guards the fields below
 	sync.Mutex // guards the fields below
 	version    *semver.Version
 	version    *semver.Version
@@ -196,7 +196,7 @@ func (c *RaftCluster) genID() {
 
 
 func (c *RaftCluster) SetID(id types.ID) { c.id = id }
 func (c *RaftCluster) SetID(id types.ID) { c.id = id }
 
 
-func (c *RaftCluster) SetStore(st store.Store) { c.store = st }
+func (c *RaftCluster) SetStore(st v2store.Store) { c.v2store = st }
 
 
 func (c *RaftCluster) SetBackend(be backend.Backend) {
 func (c *RaftCluster) SetBackend(be backend.Backend) {
 	c.be = be
 	c.be = be
@@ -207,8 +207,8 @@ func (c *RaftCluster) Recover(onSet func(*semver.Version)) {
 	c.Lock()
 	c.Lock()
 	defer c.Unlock()
 	defer c.Unlock()
 
 
-	c.members, c.removed = membersFromStore(c.store)
-	c.version = clusterVersionFromStore(c.store)
+	c.members, c.removed = membersFromStore(c.v2store)
+	c.version = clusterVersionFromStore(c.v2store)
 	mustDetectDowngrade(c.version)
 	mustDetectDowngrade(c.version)
 	onSet(c.version)
 	onSet(c.version)
 
 
@@ -223,7 +223,7 @@ func (c *RaftCluster) Recover(onSet func(*semver.Version)) {
 // ValidateConfigurationChange takes a proposed ConfChange and
 // ValidateConfigurationChange takes a proposed ConfChange and
 // ensures that it is still valid.
 // ensures that it is still valid.
 func (c *RaftCluster) ValidateConfigurationChange(cc raftpb.ConfChange) error {
 func (c *RaftCluster) ValidateConfigurationChange(cc raftpb.ConfChange) error {
-	members, removed := membersFromStore(c.store)
+	members, removed := membersFromStore(c.v2store)
 	id := types.ID(cc.NodeID)
 	id := types.ID(cc.NodeID)
 	if removed[id] {
 	if removed[id] {
 		return ErrIDRemoved
 		return ErrIDRemoved
@@ -286,8 +286,8 @@ func (c *RaftCluster) ValidateConfigurationChange(cc raftpb.ConfChange) error {
 func (c *RaftCluster) AddMember(m *Member) {
 func (c *RaftCluster) AddMember(m *Member) {
 	c.Lock()
 	c.Lock()
 	defer c.Unlock()
 	defer c.Unlock()
-	if c.store != nil {
-		mustSaveMemberToStore(c.store, m)
+	if c.v2store != nil {
+		mustSaveMemberToStore(c.v2store, m)
 	}
 	}
 	if c.be != nil {
 	if c.be != nil {
 		mustSaveMemberToBackend(c.be, m)
 		mustSaveMemberToBackend(c.be, m)
@@ -303,8 +303,8 @@ func (c *RaftCluster) AddMember(m *Member) {
 func (c *RaftCluster) RemoveMember(id types.ID) {
 func (c *RaftCluster) RemoveMember(id types.ID) {
 	c.Lock()
 	c.Lock()
 	defer c.Unlock()
 	defer c.Unlock()
-	if c.store != nil {
-		mustDeleteMemberFromStore(c.store, id)
+	if c.v2store != nil {
+		mustDeleteMemberFromStore(c.v2store, id)
 	}
 	}
 	if c.be != nil {
 	if c.be != nil {
 		mustDeleteMemberFromBackend(c.be, id)
 		mustDeleteMemberFromBackend(c.be, id)
@@ -321,8 +321,8 @@ func (c *RaftCluster) UpdateAttributes(id types.ID, attr Attributes) {
 	defer c.Unlock()
 	defer c.Unlock()
 	if m, ok := c.members[id]; ok {
 	if m, ok := c.members[id]; ok {
 		m.Attributes = attr
 		m.Attributes = attr
-		if c.store != nil {
-			mustUpdateMemberAttrInStore(c.store, m)
+		if c.v2store != nil {
+			mustUpdateMemberAttrInStore(c.v2store, m)
 		}
 		}
 		if c.be != nil {
 		if c.be != nil {
 			mustSaveMemberToBackend(c.be, m)
 			mustSaveMemberToBackend(c.be, m)
@@ -341,8 +341,8 @@ func (c *RaftCluster) UpdateRaftAttributes(id types.ID, raftAttr RaftAttributes)
 	defer c.Unlock()
 	defer c.Unlock()
 
 
 	c.members[id].RaftAttributes = raftAttr
 	c.members[id].RaftAttributes = raftAttr
-	if c.store != nil {
-		mustUpdateMemberInStore(c.store, c.members[id])
+	if c.v2store != nil {
+		mustUpdateMemberInStore(c.v2store, c.members[id])
 	}
 	}
 	if c.be != nil {
 	if c.be != nil {
 		mustSaveMemberToBackend(c.be, c.members[id])
 		mustSaveMemberToBackend(c.be, c.members[id])
@@ -370,8 +370,8 @@ func (c *RaftCluster) SetVersion(ver *semver.Version, onSet func(*semver.Version
 	}
 	}
 	c.version = ver
 	c.version = ver
 	mustDetectDowngrade(c.version)
 	mustDetectDowngrade(c.version)
-	if c.store != nil {
-		mustSaveClusterVersionToStore(c.store, ver)
+	if c.v2store != nil {
+		mustSaveClusterVersionToStore(c.v2store, ver)
 	}
 	}
 	if c.be != nil {
 	if c.be != nil {
 		mustSaveClusterVersionToBackend(c.be, ver)
 		mustSaveClusterVersionToBackend(c.be, ver)
@@ -431,7 +431,7 @@ func (c *RaftCluster) IsReadyToRemoveMember(id uint64) bool {
 	return true
 	return true
 }
 }
 
 
-func membersFromStore(st store.Store) (map[types.ID]*Member, map[types.ID]bool) {
+func membersFromStore(st v2store.Store) (map[types.ID]*Member, map[types.ID]bool) {
 	members := make(map[types.ID]*Member)
 	members := make(map[types.ID]*Member)
 	removed := make(map[types.ID]bool)
 	removed := make(map[types.ID]bool)
 	e, err := st.Get(StoreMembersPrefix, true, true)
 	e, err := st.Get(StoreMembersPrefix, true, true)
@@ -463,7 +463,7 @@ func membersFromStore(st store.Store) (map[types.ID]*Member, map[types.ID]bool)
 	return members, removed
 	return members, removed
 }
 }
 
 
-func clusterVersionFromStore(st store.Store) *semver.Version {
+func clusterVersionFromStore(st v2store.Store) *semver.Version {
 	e, err := st.Get(path.Join(storePrefix, "version"), false, false)
 	e, err := st.Get(path.Join(storePrefix, "version"), false, false)
 	if err != nil {
 	if err != nil {
 		if isKeyNotFound(err) {
 		if isKeyNotFound(err) {

+ 12 - 12
etcdserver/membership/cluster_test.go

@@ -21,7 +21,7 @@ import (
 	"reflect"
 	"reflect"
 	"testing"
 	"testing"
 
 
-	"github.com/coreos/etcd/internal/store"
+	"github.com/coreos/etcd/etcdserver/v2store"
 	"github.com/coreos/etcd/pkg/mock/mockstore"
 	"github.com/coreos/etcd/pkg/mock/mockstore"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/testutil"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
@@ -275,7 +275,7 @@ func TestClusterValidateAndAssignIDs(t *testing.T) {
 
 
 func TestClusterValidateConfigurationChange(t *testing.T) {
 func TestClusterValidateConfigurationChange(t *testing.T) {
 	cl := NewCluster("")
 	cl := NewCluster("")
-	cl.SetStore(store.New())
+	cl.SetStore(v2store.New())
 	for i := 1; i <= 4; i++ {
 	for i := 1; i <= 4; i++ {
 		attr := RaftAttributes{PeerURLs: []string{fmt.Sprintf("http://127.0.0.1:%d", i)}}
 		attr := RaftAttributes{PeerURLs: []string{fmt.Sprintf("http://127.0.0.1:%d", i)}}
 		cl.AddMember(&Member{ID: types.ID(i), RaftAttributes: attr})
 		cl.AddMember(&Member{ID: types.ID(i), RaftAttributes: attr})
@@ -416,25 +416,25 @@ func TestClusterGenID(t *testing.T) {
 }
 }
 
 
 func TestNodeToMemberBad(t *testing.T) {
 func TestNodeToMemberBad(t *testing.T) {
-	tests := []*store.NodeExtern{
-		{Key: "/1234", Nodes: []*store.NodeExtern{
+	tests := []*v2store.NodeExtern{
+		{Key: "/1234", Nodes: []*v2store.NodeExtern{
 			{Key: "/1234/strange"},
 			{Key: "/1234/strange"},
 		}},
 		}},
-		{Key: "/1234", Nodes: []*store.NodeExtern{
+		{Key: "/1234", Nodes: []*v2store.NodeExtern{
 			{Key: "/1234/raftAttributes", Value: stringp("garbage")},
 			{Key: "/1234/raftAttributes", Value: stringp("garbage")},
 		}},
 		}},
-		{Key: "/1234", Nodes: []*store.NodeExtern{
+		{Key: "/1234", Nodes: []*v2store.NodeExtern{
 			{Key: "/1234/attributes", Value: stringp(`{"name":"node1","clientURLs":null}`)},
 			{Key: "/1234/attributes", Value: stringp(`{"name":"node1","clientURLs":null}`)},
 		}},
 		}},
-		{Key: "/1234", Nodes: []*store.NodeExtern{
+		{Key: "/1234", Nodes: []*v2store.NodeExtern{
 			{Key: "/1234/raftAttributes", Value: stringp(`{"peerURLs":null}`)},
 			{Key: "/1234/raftAttributes", Value: stringp(`{"peerURLs":null}`)},
 			{Key: "/1234/strange"},
 			{Key: "/1234/strange"},
 		}},
 		}},
-		{Key: "/1234", Nodes: []*store.NodeExtern{
+		{Key: "/1234", Nodes: []*v2store.NodeExtern{
 			{Key: "/1234/raftAttributes", Value: stringp(`{"peerURLs":null}`)},
 			{Key: "/1234/raftAttributes", Value: stringp(`{"peerURLs":null}`)},
 			{Key: "/1234/attributes", Value: stringp("garbage")},
 			{Key: "/1234/attributes", Value: stringp("garbage")},
 		}},
 		}},
-		{Key: "/1234", Nodes: []*store.NodeExtern{
+		{Key: "/1234", Nodes: []*v2store.NodeExtern{
 			{Key: "/1234/raftAttributes", Value: stringp(`{"peerURLs":null}`)},
 			{Key: "/1234/raftAttributes", Value: stringp(`{"peerURLs":null}`)},
 			{Key: "/1234/attributes", Value: stringp(`{"name":"node1","clientURLs":null}`)},
 			{Key: "/1234/attributes", Value: stringp(`{"name":"node1","clientURLs":null}`)},
 			{Key: "/1234/strange"},
 			{Key: "/1234/strange"},
@@ -461,7 +461,7 @@ func TestClusterAddMember(t *testing.T) {
 				false,
 				false,
 				`{"peerURLs":null}`,
 				`{"peerURLs":null}`,
 				false,
 				false,
-				store.TTLOptionSet{ExpireTime: store.Permanent},
+				v2store.TTLOptionSet{ExpireTime: v2store.Permanent},
 			},
 			},
 		},
 		},
 	}
 	}
@@ -500,7 +500,7 @@ func TestClusterRemoveMember(t *testing.T) {
 
 
 	wactions := []testutil.Action{
 	wactions := []testutil.Action{
 		{Name: "Delete", Params: []interface{}{MemberStoreKey(1), true, true}},
 		{Name: "Delete", Params: []interface{}{MemberStoreKey(1), true, true}},
-		{Name: "Create", Params: []interface{}{RemovedMemberStoreKey(1), false, "", false, store.TTLOptionSet{ExpireTime: store.Permanent}}},
+		{Name: "Create", Params: []interface{}{RemovedMemberStoreKey(1), false, "", false, v2store.TTLOptionSet{ExpireTime: v2store.Permanent}}},
 	}
 	}
 	if !reflect.DeepEqual(st.Action(), wactions) {
 	if !reflect.DeepEqual(st.Action(), wactions) {
 		t.Errorf("actions = %v, want %v", st.Action(), wactions)
 		t.Errorf("actions = %v, want %v", st.Action(), wactions)
@@ -544,7 +544,7 @@ func TestClusterUpdateAttributes(t *testing.T) {
 }
 }
 
 
 func TestNodeToMember(t *testing.T) {
 func TestNodeToMember(t *testing.T) {
-	n := &store.NodeExtern{Key: "/1234", Nodes: []*store.NodeExtern{
+	n := &v2store.NodeExtern{Key: "/1234", Nodes: []*v2store.NodeExtern{
 		{Key: "/1234/attributes", Value: stringp(`{"name":"node1","clientURLs":null}`)},
 		{Key: "/1234/attributes", Value: stringp(`{"name":"node1","clientURLs":null}`)},
 		{Key: "/1234/raftAttributes", Value: stringp(`{"peerURLs":null}`)},
 		{Key: "/1234/raftAttributes", Value: stringp(`{"peerURLs":null}`)},
 	}}
 	}}

+ 3 - 3
etcdserver/membership/errors.go

@@ -17,7 +17,7 @@ package membership
 import (
 import (
 	"errors"
 	"errors"
 
 
-	etcdErr "github.com/coreos/etcd/error"
+	"github.com/coreos/etcd/etcdserver/v2error"
 )
 )
 
 
 var (
 var (
@@ -28,6 +28,6 @@ var (
 )
 )
 
 
 func isKeyNotFound(err error) bool {
 func isKeyNotFound(err error) bool {
-	e, ok := err.(*etcdErr.Error)
-	return ok && e.ErrorCode == etcdErr.EcodeKeyNotFound
+	e, ok := err.(*v2error.Error)
+	return ok && e.ErrorCode == v2error.EcodeKeyNotFound
 }
 }

+ 13 - 13
etcdserver/membership/store.go

@@ -19,8 +19,8 @@ import (
 	"fmt"
 	"fmt"
 	"path"
 	"path"
 
 
-	"github.com/coreos/etcd/internal/mvcc/backend"
-	"github.com/coreos/etcd/internal/store"
+	"github.com/coreos/etcd/etcdserver/v2store"
+	"github.com/coreos/etcd/mvcc/backend"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 
 
 	"github.com/coreos/go-semver/semver"
 	"github.com/coreos/go-semver/semver"
@@ -75,57 +75,57 @@ func mustSaveClusterVersionToBackend(be backend.Backend, ver *semver.Version) {
 	tx.UnsafePut(clusterBucketName, ckey, []byte(ver.String()))
 	tx.UnsafePut(clusterBucketName, ckey, []byte(ver.String()))
 }
 }
 
 
-func mustSaveMemberToStore(s store.Store, m *Member) {
+func mustSaveMemberToStore(s v2store.Store, m *Member) {
 	b, err := json.Marshal(m.RaftAttributes)
 	b, err := json.Marshal(m.RaftAttributes)
 	if err != nil {
 	if err != nil {
 		plog.Panicf("marshal raftAttributes should never fail: %v", err)
 		plog.Panicf("marshal raftAttributes should never fail: %v", err)
 	}
 	}
 	p := path.Join(MemberStoreKey(m.ID), raftAttributesSuffix)
 	p := path.Join(MemberStoreKey(m.ID), raftAttributesSuffix)
-	if _, err := s.Create(p, false, string(b), false, store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil {
+	if _, err := s.Create(p, false, string(b), false, v2store.TTLOptionSet{ExpireTime: v2store.Permanent}); err != nil {
 		plog.Panicf("create raftAttributes should never fail: %v", err)
 		plog.Panicf("create raftAttributes should never fail: %v", err)
 	}
 	}
 }
 }
 
 
-func mustDeleteMemberFromStore(s store.Store, id types.ID) {
+func mustDeleteMemberFromStore(s v2store.Store, id types.ID) {
 	if _, err := s.Delete(MemberStoreKey(id), true, true); err != nil {
 	if _, err := s.Delete(MemberStoreKey(id), true, true); err != nil {
 		plog.Panicf("delete member should never fail: %v", err)
 		plog.Panicf("delete member should never fail: %v", err)
 	}
 	}
-	if _, err := s.Create(RemovedMemberStoreKey(id), false, "", false, store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil {
+	if _, err := s.Create(RemovedMemberStoreKey(id), false, "", false, v2store.TTLOptionSet{ExpireTime: v2store.Permanent}); err != nil {
 		plog.Panicf("create removedMember should never fail: %v", err)
 		plog.Panicf("create removedMember should never fail: %v", err)
 	}
 	}
 }
 }
 
 
-func mustUpdateMemberInStore(s store.Store, m *Member) {
+func mustUpdateMemberInStore(s v2store.Store, m *Member) {
 	b, err := json.Marshal(m.RaftAttributes)
 	b, err := json.Marshal(m.RaftAttributes)
 	if err != nil {
 	if err != nil {
 		plog.Panicf("marshal raftAttributes should never fail: %v", err)
 		plog.Panicf("marshal raftAttributes should never fail: %v", err)
 	}
 	}
 	p := path.Join(MemberStoreKey(m.ID), raftAttributesSuffix)
 	p := path.Join(MemberStoreKey(m.ID), raftAttributesSuffix)
-	if _, err := s.Update(p, string(b), store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil {
+	if _, err := s.Update(p, string(b), v2store.TTLOptionSet{ExpireTime: v2store.Permanent}); err != nil {
 		plog.Panicf("update raftAttributes should never fail: %v", err)
 		plog.Panicf("update raftAttributes should never fail: %v", err)
 	}
 	}
 }
 }
 
 
-func mustUpdateMemberAttrInStore(s store.Store, m *Member) {
+func mustUpdateMemberAttrInStore(s v2store.Store, m *Member) {
 	b, err := json.Marshal(m.Attributes)
 	b, err := json.Marshal(m.Attributes)
 	if err != nil {
 	if err != nil {
 		plog.Panicf("marshal raftAttributes should never fail: %v", err)
 		plog.Panicf("marshal raftAttributes should never fail: %v", err)
 	}
 	}
 	p := path.Join(MemberStoreKey(m.ID), attributesSuffix)
 	p := path.Join(MemberStoreKey(m.ID), attributesSuffix)
-	if _, err := s.Set(p, false, string(b), store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil {
+	if _, err := s.Set(p, false, string(b), v2store.TTLOptionSet{ExpireTime: v2store.Permanent}); err != nil {
 		plog.Panicf("update raftAttributes should never fail: %v", err)
 		plog.Panicf("update raftAttributes should never fail: %v", err)
 	}
 	}
 }
 }
 
 
-func mustSaveClusterVersionToStore(s store.Store, ver *semver.Version) {
-	if _, err := s.Set(StoreClusterVersionKey(), false, ver.String(), store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil {
+func mustSaveClusterVersionToStore(s v2store.Store, ver *semver.Version) {
+	if _, err := s.Set(StoreClusterVersionKey(), false, ver.String(), v2store.TTLOptionSet{ExpireTime: v2store.Permanent}); err != nil {
 		plog.Panicf("save cluster version should never fail: %v", err)
 		plog.Panicf("save cluster version should never fail: %v", err)
 	}
 	}
 }
 }
 
 
 // nodeToMember builds member from a key value node.
 // nodeToMember builds member from a key value node.
 // the child nodes of the given node MUST be sorted by key.
 // the child nodes of the given node MUST be sorted by key.
-func nodeToMember(n *store.NodeExtern) (*Member, error) {
+func nodeToMember(n *v2store.NodeExtern) (*Member, error) {
 	m := &Member{ID: MustParseMemberIDFromKey(n.Key)}
 	m := &Member{ID: MustParseMemberIDFromKey(n.Key)}
 	attrs := make(map[string][]byte)
 	attrs := make(map[string][]byte)
 	raftAttrKey := path.Join(n.Key, raftAttributesSuffix)
 	raftAttrKey := path.Join(n.Key, raftAttributesSuffix)

+ 1 - 1
etcdserver/metrics.go

@@ -17,8 +17,8 @@ package etcdserver
 import (
 import (
 	"time"
 	"time"
 
 
-	"github.com/coreos/etcd/internal/version"
 	"github.com/coreos/etcd/pkg/runtime"
 	"github.com/coreos/etcd/pkg/runtime"
+	"github.com/coreos/etcd/version"
 
 
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/prometheus/client_golang/prometheus"
 )
 )

+ 21 - 21
etcdserver/server.go

@@ -29,22 +29,20 @@ import (
 	"sync/atomic"
 	"sync/atomic"
 	"time"
 	"time"
 
 
+	"github.com/coreos/etcd/alarm"
+	"github.com/coreos/etcd/auth"
+	"github.com/coreos/etcd/compactor"
+	"github.com/coreos/etcd/discovery"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api"
 	"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
 	"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"github.com/coreos/etcd/etcdserver/stats"
 	"github.com/coreos/etcd/etcdserver/stats"
-	"github.com/coreos/etcd/internal/alarm"
-	"github.com/coreos/etcd/internal/auth"
-	"github.com/coreos/etcd/internal/compactor"
-	"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/internal/version"
+	"github.com/coreos/etcd/etcdserver/v2store"
+	"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/fileutil"
 	"github.com/coreos/etcd/pkg/idutil"
 	"github.com/coreos/etcd/pkg/idutil"
 	"github.com/coreos/etcd/pkg/pbutil"
 	"github.com/coreos/etcd/pkg/pbutil"
@@ -55,6 +53,8 @@ import (
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/rafthttp"
 	"github.com/coreos/etcd/rafthttp"
+	"github.com/coreos/etcd/raftsnap"
+	"github.com/coreos/etcd/version"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal"
 
 
 	"github.com/coreos/go-semver/semver"
 	"github.com/coreos/go-semver/semver"
@@ -112,8 +112,8 @@ func init() {
 type Response struct {
 type Response struct {
 	Term    uint64
 	Term    uint64
 	Index   uint64
 	Index   uint64
-	Event   *store.Event
-	Watcher store.Watcher
+	Event   *v2store.Event
+	Watcher v2store.Watcher
 	Err     error
 	Err     error
 }
 }
 
 
@@ -205,7 +205,7 @@ type EtcdServer struct {
 
 
 	cluster *membership.RaftCluster
 	cluster *membership.RaftCluster
 
 
-	store       store.Store
+	v2store     v2store.Store
 	snapshotter *raftsnap.Snapshotter
 	snapshotter *raftsnap.Snapshotter
 
 
 	applyV2 ApplierV2
 	applyV2 ApplierV2
@@ -256,7 +256,7 @@ type EtcdServer struct {
 // NewServer creates a new EtcdServer from the supplied configuration. The
 // NewServer creates a new EtcdServer from the supplied configuration. The
 // configuration is considered static for the lifetime of the EtcdServer.
 // configuration is considered static for the lifetime of the EtcdServer.
 func NewServer(cfg ServerConfig) (srv *EtcdServer, err error) {
 func NewServer(cfg ServerConfig) (srv *EtcdServer, err error) {
-	st := store.New(StoreClusterPrefix, StoreKeysPrefix)
+	st := v2store.New(StoreClusterPrefix, StoreKeysPrefix)
 
 
 	var (
 	var (
 		w  *wal.WAL
 		w  *wal.WAL
@@ -414,7 +414,7 @@ func NewServer(cfg ServerConfig) (srv *EtcdServer, err error) {
 		readych:     make(chan struct{}),
 		readych:     make(chan struct{}),
 		Cfg:         cfg,
 		Cfg:         cfg,
 		errorc:      make(chan error, 1),
 		errorc:      make(chan error, 1),
-		store:       st,
+		v2store:     st,
 		snapshotter: ss,
 		snapshotter: ss,
 		r: *newRaftNode(
 		r: *newRaftNode(
 			raftNodeConfig{
 			raftNodeConfig{
@@ -436,7 +436,7 @@ func NewServer(cfg ServerConfig) (srv *EtcdServer, err error) {
 		forceVersionC: make(chan struct{}),
 		forceVersionC: make(chan struct{}),
 	}
 	}
 
 
-	srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+	srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 
 
 	srv.be = be
 	srv.be = be
 	minTTL := time.Duration((3*cfg.ElectionTicks)/2) * heartbeat
 	minTTL := time.Duration((3*cfg.ElectionTicks)/2) * heartbeat
@@ -783,7 +783,7 @@ func (s *EtcdServer) run() {
 			plog.Infof("the data-dir used by this member must be removed.")
 			plog.Infof("the data-dir used by this member must be removed.")
 			return
 			return
 		case <-getSyncC():
 		case <-getSyncC():
-			if s.store.HasTTLKeys() {
+			if s.v2store.HasTTLKeys() {
 				s.sync(s.Cfg.ReqTimeout())
 				s.sync(s.Cfg.ReqTimeout())
 			}
 			}
 		case <-s.stop:
 		case <-s.stop:
@@ -881,7 +881,7 @@ func (s *EtcdServer) applySnapshot(ep *etcdProgress, apply *apply) {
 	}
 	}
 
 
 	plog.Info("recovering store v2...")
 	plog.Info("recovering store v2...")
-	if err := s.store.Recovery(apply.snapshot.Data); err != nil {
+	if err := s.v2store.Recovery(apply.snapshot.Data); err != nil {
 		plog.Panicf("recovery store error: %v", err)
 		plog.Panicf("recovery store error: %v", err)
 	}
 	}
 	plog.Info("finished recovering store v2")
 	plog.Info("finished recovering store v2")
@@ -1047,7 +1047,7 @@ func (s *EtcdServer) LeaderStats() []byte {
 	return s.lstats.JSON()
 	return s.lstats.JSON()
 }
 }
 
 
-func (s *EtcdServer) StoreStats() []byte { return s.store.JsonStats() }
+func (s *EtcdServer) StoreStats() []byte { return s.v2store.JsonStats() }
 
 
 func (s *EtcdServer) checkMembershipOperationPermission(ctx context.Context) error {
 func (s *EtcdServer) checkMembershipOperationPermission(ctx context.Context) error {
 	if s.authStore == nil {
 	if s.authStore == nil {
@@ -1441,7 +1441,7 @@ func (s *EtcdServer) applyConfChange(cc raftpb.ConfChange, confState *raftpb.Con
 
 
 // TODO: non-blocking snapshot
 // TODO: non-blocking snapshot
 func (s *EtcdServer) snapshot(snapi uint64, confState raftpb.ConfState) {
 func (s *EtcdServer) snapshot(snapi uint64, confState raftpb.ConfState) {
-	clone := s.store.Clone()
+	clone := s.v2store.Clone()
 	// commit kv to write metadata (for example: consistent index) to disk.
 	// commit kv to write metadata (for example: consistent index) to disk.
 	// KV().commit() updates the consistent index in backend.
 	// KV().commit() updates the consistent index in backend.
 	// All operations that update consistent index must be called sequentially
 	// All operations that update consistent index must be called sequentially

+ 77 - 77
etcdserver/server_test.go

@@ -28,11 +28,10 @@ import (
 
 
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/etcdserver/membership"
 	"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/etcdserver/v2store"
+	"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/fileutil"
 	"github.com/coreos/etcd/pkg/idutil"
 	"github.com/coreos/etcd/pkg/idutil"
 	"github.com/coreos/etcd/pkg/mock/mockstorage"
 	"github.com/coreos/etcd/pkg/mock/mockstorage"
@@ -45,6 +44,7 @@ import (
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/rafthttp"
 	"github.com/coreos/etcd/rafthttp"
+	"github.com/coreos/etcd/raftsnap"
 )
 )
 
 
 // TestDoLocalAction tests requests which do not need to go through raft to be applied,
 // TestDoLocalAction tests requests which do not need to go through raft to be applied,
@@ -59,11 +59,11 @@ func TestDoLocalAction(t *testing.T) {
 	}{
 	}{
 		{
 		{
 			pb.Request{Method: "GET", ID: 1, Wait: true},
 			pb.Request{Method: "GET", ID: 1, Wait: true},
-			Response{Watcher: store.NewNopWatcher()}, nil, []testutil.Action{{Name: "Watch"}},
+			Response{Watcher: v2store.NewNopWatcher()}, nil, []testutil.Action{{Name: "Watch"}},
 		},
 		},
 		{
 		{
 			pb.Request{Method: "GET", ID: 1},
 			pb.Request{Method: "GET", ID: 1},
-			Response{Event: &store.Event{}}, nil,
+			Response{Event: &v2store.Event{}}, nil,
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Get",
 					Name:   "Get",
@@ -73,7 +73,7 @@ func TestDoLocalAction(t *testing.T) {
 		},
 		},
 		{
 		{
 			pb.Request{Method: "HEAD", ID: 1},
 			pb.Request{Method: "HEAD", ID: 1},
-			Response{Event: &store.Event{}}, nil,
+			Response{Event: &v2store.Event{}}, nil,
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Get",
 					Name:   "Get",
@@ -89,7 +89,7 @@ func TestDoLocalAction(t *testing.T) {
 	for i, tt := range tests {
 	for i, tt := range tests {
 		st := mockstore.NewRecorder()
 		st := mockstore.NewRecorder()
 		srv := &EtcdServer{
 		srv := &EtcdServer{
-			store:    st,
+			v2store:  st,
 			reqIDGen: idutil.NewGenerator(0, time.Time{}),
 			reqIDGen: idutil.NewGenerator(0, time.Time{}),
 		}
 		}
 		resp, err := srv.Do(context.TODO(), tt.req)
 		resp, err := srv.Do(context.TODO(), tt.req)
@@ -142,7 +142,7 @@ func TestDoBadLocalAction(t *testing.T) {
 	for i, tt := range tests {
 	for i, tt := range tests {
 		st := mockstore.NewErrRecorder(storeErr)
 		st := mockstore.NewErrRecorder(storeErr)
 		srv := &EtcdServer{
 		srv := &EtcdServer{
-			store:    st,
+			v2store:  st,
 			reqIDGen: idutil.NewGenerator(0, time.Time{}),
 			reqIDGen: idutil.NewGenerator(0, time.Time{}),
 		}
 		}
 		resp, err := srv.Do(context.Background(), tt.req)
 		resp, err := srv.Do(context.Background(), tt.req)
@@ -167,8 +167,8 @@ func TestApplyRepeat(t *testing.T) {
 		SoftState: &raft.SoftState{RaftState: raft.StateLeader},
 		SoftState: &raft.SoftState{RaftState: raft.StateLeader},
 	}
 	}
 	cl := newTestCluster(nil)
 	cl := newTestCluster(nil)
-	st := store.New()
-	cl.SetStore(store.New())
+	st := v2store.New()
+	cl.SetStore(v2store.New())
 	cl.AddMember(&membership.Member{ID: 1234})
 	cl.AddMember(&membership.Member{ID: 1234})
 	r := newRaftNode(raftNodeConfig{
 	r := newRaftNode(raftNodeConfig{
 		Node:        n,
 		Node:        n,
@@ -178,12 +178,12 @@ func TestApplyRepeat(t *testing.T) {
 	})
 	})
 	s := &EtcdServer{
 	s := &EtcdServer{
 		r:          *r,
 		r:          *r,
-		store:      st,
+		v2store:    st,
 		cluster:    cl,
 		cluster:    cl,
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		SyncTicker: &time.Ticker{},
 		SyncTicker: &time.Ticker{},
 	}
 	}
-	s.applyV2 = &applierV2store{store: s.store, cluster: s.cluster}
+	s.applyV2 = &applierV2store{store: s.v2store, cluster: s.cluster}
 	s.start()
 	s.start()
 	req := &pb.Request{Method: "QGET", ID: uint64(1)}
 	req := &pb.Request{Method: "QGET", ID: uint64(1)}
 	ents := []raftpb.Entry{{Index: 1, Data: pbutil.MustMarshal(req)}}
 	ents := []raftpb.Entry{{Index: 1, Data: pbutil.MustMarshal(req)}}
@@ -233,139 +233,139 @@ func TestApplyRequest(t *testing.T) {
 		// POST ==> Create
 		// POST ==> Create
 		{
 		{
 			pb.Request{Method: "POST", ID: 1},
 			pb.Request{Method: "POST", ID: 1},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Create",
 					Name:   "Create",
-					Params: []interface{}{"", false, "", true, store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", false, "", true, v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// POST ==> Create, with expiration
 		// POST ==> Create, with expiration
 		{
 		{
 			pb.Request{Method: "POST", ID: 1, Expiration: 1337},
 			pb.Request{Method: "POST", ID: 1, Expiration: 1337},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Create",
 					Name:   "Create",
-					Params: []interface{}{"", false, "", true, store.TTLOptionSet{ExpireTime: time.Unix(0, 1337)}},
+					Params: []interface{}{"", false, "", true, v2store.TTLOptionSet{ExpireTime: time.Unix(0, 1337)}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// POST ==> Create, with dir
 		// POST ==> Create, with dir
 		{
 		{
 			pb.Request{Method: "POST", ID: 1, Dir: true},
 			pb.Request{Method: "POST", ID: 1, Dir: true},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Create",
 					Name:   "Create",
-					Params: []interface{}{"", true, "", true, store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", true, "", true, v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// PUT ==> Set
 		// PUT ==> Set
 		{
 		{
 			pb.Request{Method: "PUT", ID: 1},
 			pb.Request{Method: "PUT", ID: 1},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Set",
 					Name:   "Set",
-					Params: []interface{}{"", false, "", store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", false, "", v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// PUT ==> Set, with dir
 		// PUT ==> Set, with dir
 		{
 		{
 			pb.Request{Method: "PUT", ID: 1, Dir: true},
 			pb.Request{Method: "PUT", ID: 1, Dir: true},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Set",
 					Name:   "Set",
-					Params: []interface{}{"", true, "", store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", true, "", v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// PUT with PrevExist=true ==> Update
 		// PUT with PrevExist=true ==> Update
 		{
 		{
 			pb.Request{Method: "PUT", ID: 1, PrevExist: pbutil.Boolp(true)},
 			pb.Request{Method: "PUT", ID: 1, PrevExist: pbutil.Boolp(true)},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Update",
 					Name:   "Update",
-					Params: []interface{}{"", "", store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", "", v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// PUT with PrevExist=false ==> Create
 		// PUT with PrevExist=false ==> Create
 		{
 		{
 			pb.Request{Method: "PUT", ID: 1, PrevExist: pbutil.Boolp(false)},
 			pb.Request{Method: "PUT", ID: 1, PrevExist: pbutil.Boolp(false)},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Create",
 					Name:   "Create",
-					Params: []interface{}{"", false, "", false, store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", false, "", false, v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// PUT with PrevExist=true *and* PrevIndex set ==> CompareAndSwap
 		// PUT with PrevExist=true *and* PrevIndex set ==> CompareAndSwap
 		{
 		{
 			pb.Request{Method: "PUT", ID: 1, PrevExist: pbutil.Boolp(true), PrevIndex: 1},
 			pb.Request{Method: "PUT", ID: 1, PrevExist: pbutil.Boolp(true), PrevIndex: 1},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "CompareAndSwap",
 					Name:   "CompareAndSwap",
-					Params: []interface{}{"", "", uint64(1), "", store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", "", uint64(1), "", v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// PUT with PrevExist=false *and* PrevIndex set ==> Create
 		// PUT with PrevExist=false *and* PrevIndex set ==> Create
 		{
 		{
 			pb.Request{Method: "PUT", ID: 1, PrevExist: pbutil.Boolp(false), PrevIndex: 1},
 			pb.Request{Method: "PUT", ID: 1, PrevExist: pbutil.Boolp(false), PrevIndex: 1},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Create",
 					Name:   "Create",
-					Params: []interface{}{"", false, "", false, store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", false, "", false, v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// PUT with PrevIndex set ==> CompareAndSwap
 		// PUT with PrevIndex set ==> CompareAndSwap
 		{
 		{
 			pb.Request{Method: "PUT", ID: 1, PrevIndex: 1},
 			pb.Request{Method: "PUT", ID: 1, PrevIndex: 1},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "CompareAndSwap",
 					Name:   "CompareAndSwap",
-					Params: []interface{}{"", "", uint64(1), "", store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", "", uint64(1), "", v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// PUT with PrevValue set ==> CompareAndSwap
 		// PUT with PrevValue set ==> CompareAndSwap
 		{
 		{
 			pb.Request{Method: "PUT", ID: 1, PrevValue: "bar"},
 			pb.Request{Method: "PUT", ID: 1, PrevValue: "bar"},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "CompareAndSwap",
 					Name:   "CompareAndSwap",
-					Params: []interface{}{"", "bar", uint64(0), "", store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", "bar", uint64(0), "", v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// PUT with PrevIndex and PrevValue set ==> CompareAndSwap
 		// PUT with PrevIndex and PrevValue set ==> CompareAndSwap
 		{
 		{
 			pb.Request{Method: "PUT", ID: 1, PrevIndex: 1, PrevValue: "bar"},
 			pb.Request{Method: "PUT", ID: 1, PrevIndex: 1, PrevValue: "bar"},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "CompareAndSwap",
 					Name:   "CompareAndSwap",
-					Params: []interface{}{"", "bar", uint64(1), "", store.TTLOptionSet{ExpireTime: time.Time{}}},
+					Params: []interface{}{"", "bar", uint64(1), "", v2store.TTLOptionSet{ExpireTime: time.Time{}}},
 				},
 				},
 			},
 			},
 		},
 		},
 		// DELETE ==> Delete
 		// DELETE ==> Delete
 		{
 		{
 			pb.Request{Method: "DELETE", ID: 1},
 			pb.Request{Method: "DELETE", ID: 1},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Delete",
 					Name:   "Delete",
@@ -376,7 +376,7 @@ func TestApplyRequest(t *testing.T) {
 		// DELETE with PrevIndex set ==> CompareAndDelete
 		// DELETE with PrevIndex set ==> CompareAndDelete
 		{
 		{
 			pb.Request{Method: "DELETE", ID: 1, PrevIndex: 1},
 			pb.Request{Method: "DELETE", ID: 1, PrevIndex: 1},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "CompareAndDelete",
 					Name:   "CompareAndDelete",
@@ -387,7 +387,7 @@ func TestApplyRequest(t *testing.T) {
 		// DELETE with PrevValue set ==> CompareAndDelete
 		// DELETE with PrevValue set ==> CompareAndDelete
 		{
 		{
 			pb.Request{Method: "DELETE", ID: 1, PrevValue: "bar"},
 			pb.Request{Method: "DELETE", ID: 1, PrevValue: "bar"},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "CompareAndDelete",
 					Name:   "CompareAndDelete",
@@ -398,7 +398,7 @@ func TestApplyRequest(t *testing.T) {
 		// DELETE with PrevIndex *and* PrevValue set ==> CompareAndDelete
 		// DELETE with PrevIndex *and* PrevValue set ==> CompareAndDelete
 		{
 		{
 			pb.Request{Method: "DELETE", ID: 1, PrevIndex: 5, PrevValue: "bar"},
 			pb.Request{Method: "DELETE", ID: 1, PrevIndex: 5, PrevValue: "bar"},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "CompareAndDelete",
 					Name:   "CompareAndDelete",
@@ -409,7 +409,7 @@ func TestApplyRequest(t *testing.T) {
 		// QGET ==> Get
 		// QGET ==> Get
 		{
 		{
 			pb.Request{Method: "QGET", ID: 1},
 			pb.Request{Method: "QGET", ID: 1},
-			Response{Event: &store.Event{}},
+			Response{Event: &v2store.Event{}},
 			[]testutil.Action{
 			[]testutil.Action{
 				{
 				{
 					Name:   "Get",
 					Name:   "Get",
@@ -448,8 +448,8 @@ func TestApplyRequest(t *testing.T) {
 
 
 	for i, tt := range tests {
 	for i, tt := range tests {
 		st := mockstore.NewRecorder()
 		st := mockstore.NewRecorder()
-		srv := &EtcdServer{store: st}
-		srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+		srv := &EtcdServer{v2store: st}
+		srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 		resp := srv.applyV2Request((*RequestV2)(&tt.req))
 		resp := srv.applyV2Request((*RequestV2)(&tt.req))
 
 
 		if !reflect.DeepEqual(resp, tt.wresp) {
 		if !reflect.DeepEqual(resp, tt.wresp) {
@@ -465,10 +465,10 @@ func TestApplyRequest(t *testing.T) {
 func TestApplyRequestOnAdminMemberAttributes(t *testing.T) {
 func TestApplyRequestOnAdminMemberAttributes(t *testing.T) {
 	cl := newTestCluster([]*membership.Member{{ID: 1}})
 	cl := newTestCluster([]*membership.Member{{ID: 1}})
 	srv := &EtcdServer{
 	srv := &EtcdServer{
-		store:   mockstore.NewRecorder(),
+		v2store: mockstore.NewRecorder(),
 		cluster: cl,
 		cluster: cl,
 	}
 	}
-	srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+	srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 
 
 	req := pb.Request{
 	req := pb.Request{
 		Method: "PUT",
 		Method: "PUT",
@@ -485,7 +485,7 @@ func TestApplyRequestOnAdminMemberAttributes(t *testing.T) {
 
 
 func TestApplyConfChangeError(t *testing.T) {
 func TestApplyConfChangeError(t *testing.T) {
 	cl := membership.NewCluster("")
 	cl := membership.NewCluster("")
-	cl.SetStore(store.New())
+	cl.SetStore(v2store.New())
 	for i := 1; i <= 4; i++ {
 	for i := 1; i <= 4; i++ {
 		cl.AddMember(&membership.Member{ID: types.ID(i)})
 		cl.AddMember(&membership.Member{ID: types.ID(i)})
 	}
 	}
@@ -549,7 +549,7 @@ func TestApplyConfChangeError(t *testing.T) {
 
 
 func TestApplyConfChangeShouldStop(t *testing.T) {
 func TestApplyConfChangeShouldStop(t *testing.T) {
 	cl := membership.NewCluster("")
 	cl := membership.NewCluster("")
-	cl.SetStore(store.New())
+	cl.SetStore(v2store.New())
 	for i := 1; i <= 3; i++ {
 	for i := 1; i <= 3; i++ {
 		cl.AddMember(&membership.Member{ID: types.ID(i)})
 		cl.AddMember(&membership.Member{ID: types.ID(i)})
 	}
 	}
@@ -590,7 +590,7 @@ func TestApplyConfChangeShouldStop(t *testing.T) {
 // where consistIndex equals to applied index.
 // where consistIndex equals to applied index.
 func TestApplyConfigChangeUpdatesConsistIndex(t *testing.T) {
 func TestApplyConfigChangeUpdatesConsistIndex(t *testing.T) {
 	cl := membership.NewCluster("")
 	cl := membership.NewCluster("")
-	cl.SetStore(store.New())
+	cl.SetStore(v2store.New())
 	cl.AddMember(&membership.Member{ID: types.ID(1)})
 	cl.AddMember(&membership.Member{ID: types.ID(1)})
 	r := newRaftNode(raftNodeConfig{
 	r := newRaftNode(raftNodeConfig{
 		Node:      newNodeNop(),
 		Node:      newNodeNop(),
@@ -633,7 +633,7 @@ func TestApplyConfigChangeUpdatesConsistIndex(t *testing.T) {
 // if the local member is removed along with other conf updates.
 // if the local member is removed along with other conf updates.
 func TestApplyMultiConfChangeShouldStop(t *testing.T) {
 func TestApplyMultiConfChangeShouldStop(t *testing.T) {
 	cl := membership.NewCluster("")
 	cl := membership.NewCluster("")
-	cl.SetStore(store.New())
+	cl.SetStore(v2store.New())
 	for i := 1; i <= 5; i++ {
 	for i := 1; i <= 5; i++ {
 		cl.AddMember(&membership.Member{ID: types.ID(i)})
 		cl.AddMember(&membership.Member{ID: types.ID(i)})
 	}
 	}
@@ -685,11 +685,11 @@ func TestDoProposal(t *testing.T) {
 		srv := &EtcdServer{
 		srv := &EtcdServer{
 			Cfg:        ServerConfig{TickMs: 1},
 			Cfg:        ServerConfig{TickMs: 1},
 			r:          *r,
 			r:          *r,
-			store:      st,
+			v2store:    st,
 			reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 			reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 			SyncTicker: &time.Ticker{},
 			SyncTicker: &time.Ticker{},
 		}
 		}
-		srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+		srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 		srv.start()
 		srv.start()
 		resp, err := srv.Do(context.Background(), tt)
 		resp, err := srv.Do(context.Background(), tt)
 		srv.Stop()
 		srv.Stop()
@@ -702,7 +702,7 @@ func TestDoProposal(t *testing.T) {
 			t.Fatalf("#%d: err = %v, want nil", i, err)
 			t.Fatalf("#%d: err = %v, want nil", i, err)
 		}
 		}
 		// resp.Index is set in Do() based on the raft state; may either be 0 or 1
 		// resp.Index is set in Do() based on the raft state; may either be 0 or 1
-		wresp := Response{Event: &store.Event{}, Index: resp.Index}
+		wresp := Response{Event: &v2store.Event{}, Index: resp.Index}
 		if !reflect.DeepEqual(resp, wresp) {
 		if !reflect.DeepEqual(resp, wresp) {
 			t.Errorf("#%d: resp = %v, want %v", i, resp, wresp)
 			t.Errorf("#%d: resp = %v, want %v", i, resp, wresp)
 		}
 		}
@@ -717,7 +717,7 @@ func TestDoProposalCancelled(t *testing.T) {
 		w:        wt,
 		w:        wt,
 		reqIDGen: idutil.NewGenerator(0, time.Time{}),
 		reqIDGen: idutil.NewGenerator(0, time.Time{}),
 	}
 	}
-	srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+	srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 
 
 	ctx, cancel := context.WithCancel(context.Background())
 	ctx, cancel := context.WithCancel(context.Background())
 	cancel()
 	cancel()
@@ -739,7 +739,7 @@ func TestDoProposalTimeout(t *testing.T) {
 		w:        mockwait.NewNop(),
 		w:        mockwait.NewNop(),
 		reqIDGen: idutil.NewGenerator(0, time.Time{}),
 		reqIDGen: idutil.NewGenerator(0, time.Time{}),
 	}
 	}
-	srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+	srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 
 
 	ctx, cancel := context.WithTimeout(context.Background(), 0)
 	ctx, cancel := context.WithTimeout(context.Background(), 0)
 	_, err := srv.Do(ctx, pb.Request{Method: "PUT"})
 	_, err := srv.Do(ctx, pb.Request{Method: "PUT"})
@@ -756,7 +756,7 @@ func TestDoProposalStopped(t *testing.T) {
 		w:        mockwait.NewNop(),
 		w:        mockwait.NewNop(),
 		reqIDGen: idutil.NewGenerator(0, time.Time{}),
 		reqIDGen: idutil.NewGenerator(0, time.Time{}),
 	}
 	}
-	srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+	srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 
 
 	srv.stopping = make(chan struct{})
 	srv.stopping = make(chan struct{})
 	close(srv.stopping)
 	close(srv.stopping)
@@ -776,7 +776,7 @@ func TestSync(t *testing.T) {
 		ctx:      ctx,
 		ctx:      ctx,
 		cancel:   cancel,
 		cancel:   cancel,
 	}
 	}
-	srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+	srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 
 
 	// check that sync is non-blocking
 	// check that sync is non-blocking
 	done := make(chan struct{})
 	done := make(chan struct{})
@@ -819,7 +819,7 @@ func TestSyncTimeout(t *testing.T) {
 		ctx:      ctx,
 		ctx:      ctx,
 		cancel:   cancel,
 		cancel:   cancel,
 	}
 	}
-	srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+	srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 
 
 	// check that sync is non-blocking
 	// check that sync is non-blocking
 	done := make(chan struct{})
 	done := make(chan struct{})
@@ -857,7 +857,7 @@ func TestSyncTrigger(t *testing.T) {
 	srv := &EtcdServer{
 	srv := &EtcdServer{
 		Cfg:        ServerConfig{TickMs: 1},
 		Cfg:        ServerConfig{TickMs: 1},
 		r:          *r,
 		r:          *r,
-		store:      mockstore.NewNop(),
+		v2store:    mockstore.NewNop(),
 		SyncTicker: tk,
 		SyncTicker: tk,
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 	}
 	}
@@ -913,8 +913,8 @@ func TestSnapshot(t *testing.T) {
 		storage:     p,
 		storage:     p,
 	})
 	})
 	srv := &EtcdServer{
 	srv := &EtcdServer{
-		r:     *r,
-		store: st,
+		r:       *r,
+		v2store: st,
 	}
 	}
 	srv.kv = mvcc.New(be, &lease.FakeLessor{}, &srv.consistIndex)
 	srv.kv = mvcc.New(be, &lease.FakeLessor{}, &srv.consistIndex)
 	srv.be = be
 	srv.be = be
@@ -957,7 +957,7 @@ func TestSnapshot(t *testing.T) {
 // snapshot db is applied.
 // snapshot db is applied.
 func TestSnapshotOrdering(t *testing.T) {
 func TestSnapshotOrdering(t *testing.T) {
 	n := newNopReadyNode()
 	n := newNopReadyNode()
-	st := store.New()
+	st := v2store.New()
 	cl := membership.NewCluster("abc")
 	cl := membership.NewCluster("abc")
 	cl.SetStore(st)
 	cl.SetStore(st)
 
 
@@ -985,12 +985,12 @@ func TestSnapshotOrdering(t *testing.T) {
 	s := &EtcdServer{
 	s := &EtcdServer{
 		Cfg:         ServerConfig{DataDir: testdir},
 		Cfg:         ServerConfig{DataDir: testdir},
 		r:           *r,
 		r:           *r,
-		store:       st,
+		v2store:     st,
 		snapshotter: raftsnap.New(snapdir),
 		snapshotter: raftsnap.New(snapdir),
 		cluster:     cl,
 		cluster:     cl,
 		SyncTicker:  &time.Ticker{},
 		SyncTicker:  &time.Ticker{},
 	}
 	}
-	s.applyV2 = &applierV2store{store: s.store, cluster: s.cluster}
+	s.applyV2 = &applierV2store{store: s.v2store, cluster: s.cluster}
 
 
 	be, tmpPath := backend.NewDefaultTmpBackend()
 	be, tmpPath := backend.NewDefaultTmpBackend()
 	defer os.RemoveAll(tmpPath)
 	defer os.RemoveAll(tmpPath)
@@ -1046,11 +1046,11 @@ func TestTriggerSnap(t *testing.T) {
 	srv := &EtcdServer{
 	srv := &EtcdServer{
 		Cfg:        ServerConfig{TickMs: 1, SnapCount: uint64(snapc)},
 		Cfg:        ServerConfig{TickMs: 1, SnapCount: uint64(snapc)},
 		r:          *r,
 		r:          *r,
-		store:      st,
+		v2store:    st,
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		SyncTicker: &time.Ticker{},
 		SyncTicker: &time.Ticker{},
 	}
 	}
-	srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
+	srv.applyV2 = &applierV2store{store: srv.v2store, cluster: srv.cluster}
 
 
 	srv.kv = mvcc.New(be, &lease.FakeLessor{}, &srv.consistIndex)
 	srv.kv = mvcc.New(be, &lease.FakeLessor{}, &srv.consistIndex)
 	srv.be = be
 	srv.be = be
@@ -1085,7 +1085,7 @@ func TestTriggerSnap(t *testing.T) {
 // proposals.
 // proposals.
 func TestConcurrentApplyAndSnapshotV3(t *testing.T) {
 func TestConcurrentApplyAndSnapshotV3(t *testing.T) {
 	n := newNopReadyNode()
 	n := newNopReadyNode()
-	st := store.New()
+	st := v2store.New()
 	cl := membership.NewCluster("abc")
 	cl := membership.NewCluster("abc")
 	cl.SetStore(st)
 	cl.SetStore(st)
 
 
@@ -1110,12 +1110,12 @@ func TestConcurrentApplyAndSnapshotV3(t *testing.T) {
 	s := &EtcdServer{
 	s := &EtcdServer{
 		Cfg:         ServerConfig{DataDir: testdir},
 		Cfg:         ServerConfig{DataDir: testdir},
 		r:           *r,
 		r:           *r,
-		store:       st,
+		v2store:     st,
 		snapshotter: raftsnap.New(testdir),
 		snapshotter: raftsnap.New(testdir),
 		cluster:     cl,
 		cluster:     cl,
 		SyncTicker:  &time.Ticker{},
 		SyncTicker:  &time.Ticker{},
 	}
 	}
-	s.applyV2 = &applierV2store{store: s.store, cluster: s.cluster}
+	s.applyV2 = &applierV2store{store: s.v2store, cluster: s.cluster}
 
 
 	be, tmpPath := backend.NewDefaultTmpBackend()
 	be, tmpPath := backend.NewDefaultTmpBackend()
 	defer func() {
 	defer func() {
@@ -1183,7 +1183,7 @@ func TestAddMember(t *testing.T) {
 		SoftState: &raft.SoftState{RaftState: raft.StateLeader},
 		SoftState: &raft.SoftState{RaftState: raft.StateLeader},
 	}
 	}
 	cl := newTestCluster(nil)
 	cl := newTestCluster(nil)
-	st := store.New()
+	st := v2store.New()
 	cl.SetStore(st)
 	cl.SetStore(st)
 	r := newRaftNode(raftNodeConfig{
 	r := newRaftNode(raftNodeConfig{
 		Node:        n,
 		Node:        n,
@@ -1193,7 +1193,7 @@ func TestAddMember(t *testing.T) {
 	})
 	})
 	s := &EtcdServer{
 	s := &EtcdServer{
 		r:          *r,
 		r:          *r,
-		store:      st,
+		v2store:    st,
 		cluster:    cl,
 		cluster:    cl,
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		SyncTicker: &time.Ticker{},
 		SyncTicker: &time.Ticker{},
@@ -1223,8 +1223,8 @@ func TestRemoveMember(t *testing.T) {
 		SoftState: &raft.SoftState{RaftState: raft.StateLeader},
 		SoftState: &raft.SoftState{RaftState: raft.StateLeader},
 	}
 	}
 	cl := newTestCluster(nil)
 	cl := newTestCluster(nil)
-	st := store.New()
-	cl.SetStore(store.New())
+	st := v2store.New()
+	cl.SetStore(v2store.New())
 	cl.AddMember(&membership.Member{ID: 1234})
 	cl.AddMember(&membership.Member{ID: 1234})
 	r := newRaftNode(raftNodeConfig{
 	r := newRaftNode(raftNodeConfig{
 		Node:        n,
 		Node:        n,
@@ -1234,7 +1234,7 @@ func TestRemoveMember(t *testing.T) {
 	})
 	})
 	s := &EtcdServer{
 	s := &EtcdServer{
 		r:          *r,
 		r:          *r,
-		store:      st,
+		v2store:    st,
 		cluster:    cl,
 		cluster:    cl,
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		SyncTicker: &time.Ticker{},
 		SyncTicker: &time.Ticker{},
@@ -1263,7 +1263,7 @@ func TestUpdateMember(t *testing.T) {
 		SoftState: &raft.SoftState{RaftState: raft.StateLeader},
 		SoftState: &raft.SoftState{RaftState: raft.StateLeader},
 	}
 	}
 	cl := newTestCluster(nil)
 	cl := newTestCluster(nil)
-	st := store.New()
+	st := v2store.New()
 	cl.SetStore(st)
 	cl.SetStore(st)
 	cl.AddMember(&membership.Member{ID: 1234})
 	cl.AddMember(&membership.Member{ID: 1234})
 	r := newRaftNode(raftNodeConfig{
 	r := newRaftNode(raftNodeConfig{
@@ -1274,7 +1274,7 @@ func TestUpdateMember(t *testing.T) {
 	})
 	})
 	s := &EtcdServer{
 	s := &EtcdServer{
 		r:          *r,
 		r:          *r,
-		store:      st,
+		v2store:    st,
 		cluster:    cl,
 		cluster:    cl,
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		reqIDGen:   idutil.NewGenerator(0, time.Time{}),
 		SyncTicker: &time.Ticker{},
 		SyncTicker: &time.Ticker{},

+ 3 - 3
etcdserver/snapshot_merge.go

@@ -17,9 +17,9 @@ package etcdserver
 import (
 import (
 	"io"
 	"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"
 	"github.com/coreos/etcd/raft/raftpb"
+	"github.com/coreos/etcd/raftsnap"
 )
 )
 
 
 // createMergedSnapshotMessage creates a snapshot message that contains: raft status (term, conf),
 // createMergedSnapshotMessage creates a snapshot message that contains: raft status (term, conf),
@@ -27,7 +27,7 @@ import (
 // as ReadCloser.
 // as ReadCloser.
 func (s *EtcdServer) createMergedSnapshotMessage(m raftpb.Message, snapt, snapi uint64, confState raftpb.ConfState) raftsnap.Message {
 func (s *EtcdServer) createMergedSnapshotMessage(m raftpb.Message, snapt, snapi uint64, confState raftpb.ConfState) raftsnap.Message {
 	// get a snapshot of v2 store as []byte
 	// get a snapshot of v2 store as []byte
-	clone := s.store.Clone()
+	clone := s.v2store.Clone()
 	d, err := clone.SaveNoCopy()
 	d, err := clone.SaveNoCopy()
 	if err != nil {
 	if err != nil {
 		plog.Panicf("store save should never fail: %v", err)
 		plog.Panicf("store save should never fail: %v", err)

+ 1 - 1
etcdserver/storage.go

@@ -18,10 +18,10 @@ import (
 	"io"
 	"io"
 
 
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
-	"github.com/coreos/etcd/internal/raftsnap"
 	"github.com/coreos/etcd/pkg/pbutil"
 	"github.com/coreos/etcd/pkg/pbutil"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/raft/raftpb"
 	"github.com/coreos/etcd/raft/raftpb"
+	"github.com/coreos/etcd/raftsnap"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal/walpb"
 	"github.com/coreos/etcd/wal/walpb"
 )
 )

Some files were not shown because too many files changed in this diff