diff --git a/.travis.yml b/.travis.yml index ce44e8082..9378a58f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,6 +68,7 @@ before_install: install: - go get -t -v -d ./... - (cd tests && go get -t -v -d ./...) + - (cd pkg && go get -t -v -d ./...) script: - echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}" diff --git a/api/go.mod b/api/go.mod index 9979eab2f..b448bf108 100644 --- a/api/go.mod +++ b/api/go.mod @@ -13,4 +13,10 @@ require ( // Bad imports are sometimes causing attempts to pull that code. // This makes the error more explicit. -replace go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY +replace ( + go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY + go.etcd.io/etcd/api/v3 => ./FORBIDDEN_DEPENDENCY + go.etcd.io/etcd/pkg/v3 => ./FORBIDDEN_DEPENDENCY + go.etcd.io/etcd/tests/v3 => ./FORBIDDEN_DEPENDENCY + go.etcd.io/etcd/v3 => ./FORBIDDEN_DEPENDENCY +) diff --git a/auth/main_test.go b/auth/main_test.go index 442c18ed6..361c81a63 100644 --- a/auth/main_test.go +++ b/auth/main_test.go @@ -7,7 +7,7 @@ package auth import ( "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestMain(m *testing.M) { diff --git a/auth/range_perm_cache.go b/auth/range_perm_cache.go index c4ad8e7c4..d1c5e655b 100644 --- a/auth/range_perm_cache.go +++ b/auth/range_perm_cache.go @@ -16,8 +16,8 @@ package auth import ( "go.etcd.io/etcd/api/v3/authpb" + "go.etcd.io/etcd/pkg/v3/adt" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/adt" "go.uber.org/zap" ) diff --git a/auth/range_perm_cache_test.go b/auth/range_perm_cache_test.go index 99be6b840..2f3251593 100644 --- a/auth/range_perm_cache_test.go +++ b/auth/range_perm_cache_test.go @@ -18,7 +18,7 @@ import ( "testing" "go.etcd.io/etcd/api/v3/authpb" - "go.etcd.io/etcd/v3/pkg/adt" + "go.etcd.io/etcd/pkg/v3/adt" "go.uber.org/zap" ) diff --git a/bill-of-materials.json b/bill-of-materials.json index 623db25b1..cec190abd 100644 --- a/bill-of-materials.json +++ b/bill-of-materials.json @@ -350,6 +350,15 @@ } ] }, + { + "project": "go.etcd.io/etcd/pkg/v3", + "licenses": [ + { + "type": "Apache License 2.0", + "confidence": 1 + } + ] + }, { "project": "go.etcd.io/etcd/tests/v3", "licenses": [ diff --git a/client/client_test.go b/client/client_test.go index efca97b01..8e83bd2de 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -30,7 +30,7 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) type actionAssertingHTTPClient struct { diff --git a/client/discover.go b/client/discover.go index 7b9868b7f..7209304cc 100644 --- a/client/discover.go +++ b/client/discover.go @@ -15,7 +15,7 @@ package client import ( - "go.etcd.io/etcd/v3/pkg/srv" + "go.etcd.io/etcd/pkg/v3/srv" ) // Discoverer is an interface that wraps the Discover method. diff --git a/client/keys.go b/client/keys.go index bc55c09c1..f98368bf9 100644 --- a/client/keys.go +++ b/client/keys.go @@ -19,7 +19,7 @@ import ( "encoding/json" "errors" "fmt" - "go.etcd.io/etcd/v3/pkg/pathutil" + "go.etcd.io/etcd/pkg/v3/pathutil" "net/http" "net/url" "strconv" diff --git a/client/main_test.go b/client/main_test.go index eead65da0..929fab359 100644 --- a/client/main_test.go +++ b/client/main_test.go @@ -18,7 +18,7 @@ import ( "net/http" "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func exampleEndpoints() []string { return nil } diff --git a/client/members.go b/client/members.go index 6a87b1a29..59d31ab81 100644 --- a/client/members.go +++ b/client/members.go @@ -23,7 +23,7 @@ import ( "net/url" "path" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) var ( diff --git a/client/members_test.go b/client/members_test.go index c75e71d8f..dd47d4364 100644 --- a/client/members_test.go +++ b/client/members_test.go @@ -23,7 +23,7 @@ import ( "reflect" "testing" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) func TestMembersAPIActionList(t *testing.T) { diff --git a/pkg/mock/mockserver/doc.go b/client/mock/mockserver/doc.go similarity index 100% rename from pkg/mock/mockserver/doc.go rename to client/mock/mockserver/doc.go diff --git a/pkg/mock/mockserver/mockserver.go b/client/mock/mockserver/mockserver.go similarity index 100% rename from pkg/mock/mockserver/mockserver.go rename to client/mock/mockserver/mockserver.go diff --git a/clientv3/balancer/balancer_test.go b/clientv3/balancer/balancer_test.go index 28ace00fd..0ccd2abaa 100644 --- a/clientv3/balancer/balancer_test.go +++ b/clientv3/balancer/balancer_test.go @@ -22,9 +22,9 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/v3/client/mock/mockserver" "go.etcd.io/etcd/v3/clientv3/balancer/picker" "go.etcd.io/etcd/v3/clientv3/balancer/resolver/endpoint" - "go.etcd.io/etcd/v3/pkg/mock/mockserver" "go.uber.org/zap" "google.golang.org/grpc" diff --git a/clientv3/client.go b/clientv3/client.go index 8adf75551..123e35b3e 100644 --- a/clientv3/client.go +++ b/clientv3/client.go @@ -27,11 +27,11 @@ import ( "github.com/google/uuid" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/logutil" "go.etcd.io/etcd/v3/clientv3/balancer" "go.etcd.io/etcd/v3/clientv3/balancer/picker" "go.etcd.io/etcd/v3/clientv3/balancer/resolver/endpoint" "go.etcd.io/etcd/v3/clientv3/credentials" - "go.etcd.io/etcd/v3/pkg/logutil" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/clientv3/client_test.go b/clientv3/client_test.go index 963a737f3..e6918f12c 100644 --- a/clientv3/client_test.go +++ b/clientv3/client_test.go @@ -22,7 +22,7 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" "google.golang.org/grpc" ) diff --git a/clientv3/cluster.go b/clientv3/cluster.go index 3c9d88c0b..dd38e3de5 100644 --- a/clientv3/cluster.go +++ b/clientv3/cluster.go @@ -18,7 +18,7 @@ import ( "context" pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" "google.golang.org/grpc" ) diff --git a/clientv3/concurrency/main_test.go b/clientv3/concurrency/main_test.go index 099fa904b..168b018ba 100644 --- a/clientv3/concurrency/main_test.go +++ b/clientv3/concurrency/main_test.go @@ -17,7 +17,7 @@ package concurrency_test import ( "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func exampleEndpoints() []string { return nil } diff --git a/clientv3/logger.go b/clientv3/logger.go index 0e0bfc8aa..c906fedfd 100644 --- a/clientv3/logger.go +++ b/clientv3/logger.go @@ -18,7 +18,7 @@ import ( "io/ioutil" "sync" - "go.etcd.io/etcd/v3/pkg/logutil" + "go.etcd.io/etcd/pkg/v3/logutil" "google.golang.org/grpc/grpclog" ) diff --git a/clientv3/main_test.go b/clientv3/main_test.go index b10e4d334..a588e3304 100644 --- a/clientv3/main_test.go +++ b/clientv3/main_test.go @@ -18,7 +18,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) const ( diff --git a/clientv3/snapshot/v3_snapshot.go b/clientv3/snapshot/v3_snapshot.go index c7aa5b629..c5e931774 100644 --- a/clientv3/snapshot/v3_snapshot.go +++ b/clientv3/snapshot/v3_snapshot.go @@ -23,8 +23,8 @@ import ( "time" "github.com/dustin/go-humanize" + "go.etcd.io/etcd/pkg/v3/fileutil" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/fileutil" "go.uber.org/zap" ) diff --git a/clientv3/txn_test.go b/clientv3/txn_test.go index 8fabca022..da762fadf 100644 --- a/clientv3/txn_test.go +++ b/clientv3/txn_test.go @@ -18,7 +18,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestTxnPanics(t *testing.T) { diff --git a/clientv3/yaml/config.go b/clientv3/yaml/config.go index 17390f9cb..858172802 100644 --- a/clientv3/yaml/config.go +++ b/clientv3/yaml/config.go @@ -22,8 +22,8 @@ import ( "sigs.k8s.io/yaml" + "go.etcd.io/etcd/pkg/v3/tlsutil" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/tlsutil" ) type yamlConfig struct { diff --git a/contrib/raftexample/raft.go b/contrib/raftexample/raft.go index 26bdafb97..c1aeed361 100644 --- a/contrib/raftexample/raft.go +++ b/contrib/raftexample/raft.go @@ -24,11 +24,11 @@ import ( "strconv" "time" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/rafthttp" "go.etcd.io/etcd/v3/etcdserver/api/snap" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal" diff --git a/embed/config.go b/embed/config.go index 88e357270..58665bbed 100644 --- a/embed/config.go +++ b/embed/config.go @@ -26,15 +26,15 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/flags" + "go.etcd.io/etcd/pkg/v3/logutil" + "go.etcd.io/etcd/pkg/v3/netutil" + "go.etcd.io/etcd/pkg/v3/srv" + "go.etcd.io/etcd/pkg/v3/tlsutil" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api/v3compactor" - "go.etcd.io/etcd/v3/pkg/flags" - "go.etcd.io/etcd/v3/pkg/logutil" - "go.etcd.io/etcd/v3/pkg/netutil" - "go.etcd.io/etcd/v3/pkg/srv" - "go.etcd.io/etcd/v3/pkg/tlsutil" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" bolt "go.etcd.io/bbolt" "go.uber.org/zap" diff --git a/embed/config_logging.go b/embed/config_logging.go index edb7d224a..7886772e7 100644 --- a/embed/config_logging.go +++ b/embed/config_logging.go @@ -19,7 +19,7 @@ import ( "fmt" "sync" - "go.etcd.io/etcd/v3/pkg/logutil" + "go.etcd.io/etcd/pkg/v3/logutil" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/embed/config_logging_journal_unix.go b/embed/config_logging_journal_unix.go index db70ab9d4..591b29ebd 100644 --- a/embed/config_logging_journal_unix.go +++ b/embed/config_logging_journal_unix.go @@ -20,7 +20,7 @@ import ( "fmt" "os" - "go.etcd.io/etcd/v3/pkg/logutil" + "go.etcd.io/etcd/pkg/v3/logutil" "go.uber.org/zap/zapcore" ) diff --git a/embed/config_test.go b/embed/config_test.go index 874ec9223..0c119f3a9 100644 --- a/embed/config_test.go +++ b/embed/config_test.go @@ -22,7 +22,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/transport" "sigs.k8s.io/yaml" ) diff --git a/embed/etcd.go b/embed/etcd.go index 95e43ced9..921200499 100644 --- a/embed/etcd.go +++ b/embed/etcd.go @@ -30,6 +30,10 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/debugutil" + runtimeutil "go.etcd.io/etcd/pkg/v3/runtime" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api/etcdhttp" "go.etcd.io/etcd/v3/etcdserver/api/rafthttp" @@ -37,10 +41,6 @@ import ( "go.etcd.io/etcd/v3/etcdserver/api/v2v3" "go.etcd.io/etcd/v3/etcdserver/api/v3client" "go.etcd.io/etcd/v3/etcdserver/api/v3rpc" - "go.etcd.io/etcd/v3/pkg/debugutil" - runtimeutil "go.etcd.io/etcd/v3/pkg/runtime" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/soheilhy/cmux" diff --git a/embed/serve.go b/embed/serve.go index ffd42f2f9..45d73dfc2 100644 --- a/embed/serve.go +++ b/embed/serve.go @@ -24,6 +24,9 @@ import ( "strings" etcdservergw "go.etcd.io/etcd/api/v3/etcdserverpb/gw" + "go.etcd.io/etcd/pkg/v3/debugutil" + "go.etcd.io/etcd/pkg/v3/httputil" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/v3/clientv3/credentials" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api/v3client" @@ -34,9 +37,6 @@ import ( "go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb" v3lockgw "go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb/gw" "go.etcd.io/etcd/v3/etcdserver/api/v3rpc" - "go.etcd.io/etcd/v3/pkg/debugutil" - "go.etcd.io/etcd/v3/pkg/httputil" - "go.etcd.io/etcd/v3/pkg/transport" gw "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/soheilhy/cmux" diff --git a/etcdctl/ctlv2/command/backup_command.go b/etcdctl/ctlv2/command/backup_command.go index a4072684c..8f26c8514 100644 --- a/etcdctl/ctlv2/command/backup_command.go +++ b/etcdctl/ctlv2/command/backup_command.go @@ -24,11 +24,11 @@ import ( "time" "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/idutil" + "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/snap" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/idutil" - "go.etcd.io/etcd/v3/pkg/pbutil" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal" "go.etcd.io/etcd/v3/wal/walpb" diff --git a/etcdctl/ctlv2/command/role_commands.go b/etcdctl/ctlv2/command/role_commands.go index 6a5213d43..79f9b7416 100644 --- a/etcdctl/ctlv2/command/role_commands.go +++ b/etcdctl/ctlv2/command/role_commands.go @@ -21,8 +21,8 @@ import ( "strings" "github.com/urfave/cli" + "go.etcd.io/etcd/pkg/v3/pathutil" "go.etcd.io/etcd/v3/client" - "go.etcd.io/etcd/v3/pkg/pathutil" ) func NewRoleCommands() cli.Command { diff --git a/etcdctl/ctlv2/command/util.go b/etcdctl/ctlv2/command/util.go index 498c9df3b..ca272efeb 100644 --- a/etcdctl/ctlv2/command/util.go +++ b/etcdctl/ctlv2/command/util.go @@ -28,8 +28,8 @@ import ( "syscall" "time" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/v3/client" - "go.etcd.io/etcd/v3/pkg/transport" "github.com/bgentry/speakeasy" "github.com/urfave/cli" diff --git a/etcdctl/ctlv3/command/check.go b/etcdctl/ctlv3/command/check.go index ec748a256..becd46b7a 100644 --- a/etcdctl/ctlv3/command/check.go +++ b/etcdctl/ctlv3/command/check.go @@ -25,8 +25,8 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/report" v3 "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/report" "github.com/spf13/cobra" "golang.org/x/time/rate" diff --git a/etcdctl/ctlv3/command/ep_command.go b/etcdctl/ctlv3/command/ep_command.go index 9b97a6681..76d5be637 100644 --- a/etcdctl/ctlv3/command/ep_command.go +++ b/etcdctl/ctlv3/command/ep_command.go @@ -21,8 +21,8 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/flags" v3 "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/flags" "github.com/spf13/cobra" "go.uber.org/zap" diff --git a/etcdctl/ctlv3/command/global.go b/etcdctl/ctlv3/command/global.go index aafc154ba..daf73c0c4 100644 --- a/etcdctl/ctlv3/command/global.go +++ b/etcdctl/ctlv3/command/global.go @@ -25,10 +25,10 @@ import ( "time" "github.com/bgentry/speakeasy" + "go.etcd.io/etcd/pkg/v3/flags" + "go.etcd.io/etcd/pkg/v3/srv" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/flags" - "go.etcd.io/etcd/v3/pkg/srv" - "go.etcd.io/etcd/v3/pkg/transport" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/etcdctl/ctlv3/command/migrate_command.go b/etcdctl/ctlv3/command/migrate_command.go index d45beb7cb..b232f097f 100644 --- a/etcdctl/ctlv3/command/migrate_command.go +++ b/etcdctl/ctlv3/command/migrate_command.go @@ -26,6 +26,8 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/client" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api" @@ -35,8 +37,6 @@ import ( "go.etcd.io/etcd/v3/etcdserver/api/v2store" "go.etcd.io/etcd/v3/mvcc" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal" "go.etcd.io/etcd/v3/wal/walpb" diff --git a/etcdctl/ctlv3/command/printer_simple.go b/etcdctl/ctlv3/command/printer_simple.go index 04b9c0bfc..e9a529008 100644 --- a/etcdctl/ctlv3/command/printer_simple.go +++ b/etcdctl/ctlv3/command/printer_simple.go @@ -20,9 +20,9 @@ import ( "strings" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/types" v3 "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/etcdctl/snapshot" - "go.etcd.io/etcd/v3/pkg/types" ) type simplePrinter struct { diff --git a/etcdctl/snapshot/v3_snapshot.go b/etcdctl/snapshot/v3_snapshot.go index 982acccf9..d544b836d 100644 --- a/etcdctl/snapshot/v3_snapshot.go +++ b/etcdctl/snapshot/v3_snapshot.go @@ -29,6 +29,9 @@ import ( bolt "go.etcd.io/bbolt" "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/traceutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/snapshot" "go.etcd.io/etcd/v3/etcdserver" @@ -39,9 +42,6 @@ import ( "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/traceutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal" diff --git a/etcdmain/config.go b/etcdmain/config.go index 7295f34f9..fb7f34bb1 100644 --- a/etcdmain/config.go +++ b/etcdmain/config.go @@ -25,9 +25,9 @@ import ( "runtime" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/flags" + "go.etcd.io/etcd/pkg/v3/logutil" "go.etcd.io/etcd/v3/embed" - "go.etcd.io/etcd/v3/pkg/flags" - "go.etcd.io/etcd/v3/pkg/logutil" "go.uber.org/zap" "sigs.k8s.io/yaml" diff --git a/etcdmain/etcd.go b/etcdmain/etcd.go index de024dc72..18c80a613 100644 --- a/etcdmain/etcd.go +++ b/etcdmain/etcd.go @@ -26,15 +26,15 @@ import ( "strings" "time" + "go.etcd.io/etcd/pkg/v3/fileutil" + pkgioutil "go.etcd.io/etcd/pkg/v3/ioutil" + "go.etcd.io/etcd/pkg/v3/osutil" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/embed" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api/etcdhttp" "go.etcd.io/etcd/v3/etcdserver/api/v2discovery" - "go.etcd.io/etcd/v3/pkg/fileutil" - pkgioutil "go.etcd.io/etcd/v3/pkg/ioutil" - "go.etcd.io/etcd/v3/pkg/osutil" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/proxy/httpproxy" "go.uber.org/zap" diff --git a/etcdmain/grpc_proxy.go b/etcdmain/grpc_proxy.go index 29e36b384..c5dfe42f3 100644 --- a/etcdmain/grpc_proxy.go +++ b/etcdmain/grpc_proxy.go @@ -30,6 +30,9 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/debugutil" + "go.etcd.io/etcd/pkg/v3/logutil" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/leasing" "go.etcd.io/etcd/v3/clientv3/namespace" @@ -37,9 +40,6 @@ import ( "go.etcd.io/etcd/v3/embed" "go.etcd.io/etcd/v3/etcdserver/api/v3election/v3electionpb" "go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb" - "go.etcd.io/etcd/v3/pkg/debugutil" - "go.etcd.io/etcd/v3/pkg/logutil" - "go.etcd.io/etcd/v3/pkg/transport" "go.etcd.io/etcd/v3/proxy/grpcproxy" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" diff --git a/etcdmain/util.go b/etcdmain/util.go index af84321ba..8cc10f59a 100644 --- a/etcdmain/util.go +++ b/etcdmain/util.go @@ -18,8 +18,8 @@ import ( "fmt" "os" - "go.etcd.io/etcd/v3/pkg/srv" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/srv" + "go.etcd.io/etcd/pkg/v3/transport" "go.uber.org/zap" ) diff --git a/etcdserver/api/cluster.go b/etcdserver/api/cluster.go index d8109272a..ed0794726 100644 --- a/etcdserver/api/cluster.go +++ b/etcdserver/api/cluster.go @@ -15,8 +15,8 @@ package api import ( + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/membership" - "go.etcd.io/etcd/v3/pkg/types" "github.com/coreos/go-semver/semver" ) diff --git a/etcdserver/api/etcdhttp/peer.go b/etcdserver/api/etcdhttp/peer.go index 0b97c05fb..e8963d17c 100644 --- a/etcdserver/api/etcdhttp/peer.go +++ b/etcdserver/api/etcdhttp/peer.go @@ -21,12 +21,12 @@ import ( "strconv" "strings" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/rafthttp" "go.etcd.io/etcd/v3/lease/leasehttp" - "go.etcd.io/etcd/v3/pkg/types" "go.uber.org/zap" ) diff --git a/etcdserver/api/etcdhttp/peer_test.go b/etcdserver/api/etcdhttp/peer_test.go index 89222d46a..f4e4becb9 100644 --- a/etcdserver/api/etcdhttp/peer_test.go +++ b/etcdserver/api/etcdhttp/peer_test.go @@ -30,11 +30,11 @@ import ( "github.com/coreos/go-semver/semver" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/rafthttp" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/types" ) type fakeCluster struct { diff --git a/etcdserver/api/membership/cluster.go b/etcdserver/api/membership/cluster.go index aecd9ed15..07d9cf5c9 100644 --- a/etcdserver/api/membership/cluster.go +++ b/etcdserver/api/membership/cluster.go @@ -28,10 +28,10 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/netutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/v2store" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/netutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" diff --git a/etcdserver/api/membership/cluster_test.go b/etcdserver/api/membership/cluster_test.go index affb10e1d..ede80bf02 100644 --- a/etcdserver/api/membership/cluster_test.go +++ b/etcdserver/api/membership/cluster_test.go @@ -23,11 +23,11 @@ import ( "github.com/coreos/go-semver/semver" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/v2store" - "go.etcd.io/etcd/v3/pkg/mock/mockstore" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" + "go.etcd.io/etcd/v3/server/mock/mockstore" "go.uber.org/zap" ) diff --git a/etcdserver/api/membership/member.go b/etcdserver/api/membership/member.go index 33012e020..98a00ba95 100644 --- a/etcdserver/api/membership/member.go +++ b/etcdserver/api/membership/member.go @@ -22,7 +22,7 @@ import ( "sort" "time" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) // RaftAttributes represents the raft related attributes of an etcd member. diff --git a/etcdserver/api/membership/member_test.go b/etcdserver/api/membership/member_test.go index c67eb0a6d..68d3bb3c2 100644 --- a/etcdserver/api/membership/member_test.go +++ b/etcdserver/api/membership/member_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) func timeParse(value string) *time.Time { diff --git a/etcdserver/api/membership/store.go b/etcdserver/api/membership/store.go index 8525fe1e2..892b84902 100644 --- a/etcdserver/api/membership/store.go +++ b/etcdserver/api/membership/store.go @@ -19,9 +19,9 @@ import ( "fmt" "path" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/v2store" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/types" "github.com/coreos/go-semver/semver" "go.uber.org/zap" diff --git a/etcdserver/api/rafthttp/functional_test.go b/etcdserver/api/rafthttp/functional_test.go index 7b8ce9b8c..9d2010d26 100644 --- a/etcdserver/api/rafthttp/functional_test.go +++ b/etcdserver/api/rafthttp/functional_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/types" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" diff --git a/etcdserver/api/rafthttp/http.go b/etcdserver/api/rafthttp/http.go index b586e31ff..24a06b966 100644 --- a/etcdserver/api/rafthttp/http.go +++ b/etcdserver/api/rafthttp/http.go @@ -25,9 +25,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" + pioutil "go.etcd.io/etcd/pkg/v3/ioutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/snap" - pioutil "go.etcd.io/etcd/v3/pkg/ioutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" humanize "github.com/dustin/go-humanize" diff --git a/etcdserver/api/rafthttp/http_test.go b/etcdserver/api/rafthttp/http_test.go index 7cd4fa982..e6688c76b 100644 --- a/etcdserver/api/rafthttp/http_test.go +++ b/etcdserver/api/rafthttp/http_test.go @@ -27,9 +27,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/snap" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "go.uber.org/zap" diff --git a/etcdserver/api/rafthttp/msg_codec.go b/etcdserver/api/rafthttp/msg_codec.go index bf522c273..7d3e6aaf0 100644 --- a/etcdserver/api/rafthttp/msg_codec.go +++ b/etcdserver/api/rafthttp/msg_codec.go @@ -19,7 +19,7 @@ import ( "errors" "io" - "go.etcd.io/etcd/v3/pkg/pbutil" + "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/v3/raft/raftpb" ) diff --git a/etcdserver/api/rafthttp/msgappv2_codec.go b/etcdserver/api/rafthttp/msgappv2_codec.go index 5e7149d96..0adf527b2 100644 --- a/etcdserver/api/rafthttp/msgappv2_codec.go +++ b/etcdserver/api/rafthttp/msgappv2_codec.go @@ -20,9 +20,9 @@ import ( "io" "time" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/types" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" ) diff --git a/etcdserver/api/rafthttp/msgappv2_codec_test.go b/etcdserver/api/rafthttp/msgappv2_codec_test.go index 4f4804e16..52ce6e437 100644 --- a/etcdserver/api/rafthttp/msgappv2_codec_test.go +++ b/etcdserver/api/rafthttp/msgappv2_codec_test.go @@ -19,8 +19,8 @@ import ( "reflect" "testing" + "go.etcd.io/etcd/pkg/v3/types" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" ) diff --git a/etcdserver/api/rafthttp/peer.go b/etcdserver/api/rafthttp/peer.go index 6b82f7f83..1f41fe962 100644 --- a/etcdserver/api/rafthttp/peer.go +++ b/etcdserver/api/rafthttp/peer.go @@ -19,9 +19,9 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/snap" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" diff --git a/etcdserver/api/rafthttp/peer_status.go b/etcdserver/api/rafthttp/peer_status.go index 470f0e7dc..27f691d2f 100644 --- a/etcdserver/api/rafthttp/peer_status.go +++ b/etcdserver/api/rafthttp/peer_status.go @@ -20,7 +20,7 @@ import ( "sync" "time" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" "go.uber.org/zap" ) diff --git a/etcdserver/api/rafthttp/pipeline.go b/etcdserver/api/rafthttp/pipeline.go index fe78ddeed..016de02bd 100644 --- a/etcdserver/api/rafthttp/pipeline.go +++ b/etcdserver/api/rafthttp/pipeline.go @@ -22,9 +22,9 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/types" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" diff --git a/etcdserver/api/rafthttp/pipeline_test.go b/etcdserver/api/rafthttp/pipeline_test.go index bf4f33646..d9fa4186b 100644 --- a/etcdserver/api/rafthttp/pipeline_test.go +++ b/etcdserver/api/rafthttp/pipeline_test.go @@ -25,9 +25,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/types" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "go.uber.org/zap" diff --git a/etcdserver/api/rafthttp/remote.go b/etcdserver/api/rafthttp/remote.go index b2f8a0806..6121cf566 100644 --- a/etcdserver/api/rafthttp/remote.go +++ b/etcdserver/api/rafthttp/remote.go @@ -15,7 +15,7 @@ package rafthttp import ( - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/raft/raftpb" "go.uber.org/zap" diff --git a/etcdserver/api/rafthttp/snapshot_sender.go b/etcdserver/api/rafthttp/snapshot_sender.go index 698a4ff4b..9154a67d5 100644 --- a/etcdserver/api/rafthttp/snapshot_sender.go +++ b/etcdserver/api/rafthttp/snapshot_sender.go @@ -22,10 +22,10 @@ import ( "net/http" "time" + "go.etcd.io/etcd/pkg/v3/httputil" + pioutil "go.etcd.io/etcd/pkg/v3/ioutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/snap" - "go.etcd.io/etcd/v3/pkg/httputil" - pioutil "go.etcd.io/etcd/v3/pkg/ioutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "github.com/dustin/go-humanize" diff --git a/etcdserver/api/rafthttp/snapshot_test.go b/etcdserver/api/rafthttp/snapshot_test.go index 03ee21d81..40de56e17 100644 --- a/etcdserver/api/rafthttp/snapshot_test.go +++ b/etcdserver/api/rafthttp/snapshot_test.go @@ -25,8 +25,8 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/snap" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "go.uber.org/zap" diff --git a/etcdserver/api/rafthttp/stream.go b/etcdserver/api/rafthttp/stream.go index f7a9714c2..7ae38f64a 100644 --- a/etcdserver/api/rafthttp/stream.go +++ b/etcdserver/api/rafthttp/stream.go @@ -26,10 +26,10 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/httputil" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/httputil" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "github.com/coreos/go-semver/semver" diff --git a/etcdserver/api/rafthttp/stream_test.go b/etcdserver/api/rafthttp/stream_test.go index f97e5ed6d..41cb8b852 100644 --- a/etcdserver/api/rafthttp/stream_test.go +++ b/etcdserver/api/rafthttp/stream_test.go @@ -27,9 +27,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/types" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "github.com/coreos/go-semver/semver" diff --git a/etcdserver/api/rafthttp/transport.go b/etcdserver/api/rafthttp/transport.go index b4ada235d..d5f881aa5 100644 --- a/etcdserver/api/rafthttp/transport.go +++ b/etcdserver/api/rafthttp/transport.go @@ -20,10 +20,10 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/snap" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" diff --git a/etcdserver/api/rafthttp/transport_bench_test.go b/etcdserver/api/rafthttp/transport_bench_test.go index ab6d06f19..ab352bbdd 100644 --- a/etcdserver/api/rafthttp/transport_bench_test.go +++ b/etcdserver/api/rafthttp/transport_bench_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/types" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" diff --git a/etcdserver/api/rafthttp/transport_test.go b/etcdserver/api/rafthttp/transport_test.go index 32dad24c3..5e2d042d0 100644 --- a/etcdserver/api/rafthttp/transport_test.go +++ b/etcdserver/api/rafthttp/transport_test.go @@ -20,9 +20,9 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/types" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "github.com/xiang90/probing" diff --git a/etcdserver/api/rafthttp/urlpick.go b/etcdserver/api/rafthttp/urlpick.go index 33eb7e96f..6581ffc71 100644 --- a/etcdserver/api/rafthttp/urlpick.go +++ b/etcdserver/api/rafthttp/urlpick.go @@ -18,7 +18,7 @@ import ( "net/url" "sync" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) type urlPicker struct { diff --git a/etcdserver/api/rafthttp/urlpick_test.go b/etcdserver/api/rafthttp/urlpick_test.go index 730b4f3fc..885c5ca6e 100644 --- a/etcdserver/api/rafthttp/urlpick_test.go +++ b/etcdserver/api/rafthttp/urlpick_test.go @@ -18,7 +18,7 @@ import ( "net/url" "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) // TestURLPickerPickTwice tests that pick returns a possible url, diff --git a/etcdserver/api/rafthttp/util.go b/etcdserver/api/rafthttp/util.go index f084c0c68..37bdac8e6 100644 --- a/etcdserver/api/rafthttp/util.go +++ b/etcdserver/api/rafthttp/util.go @@ -24,8 +24,8 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" "github.com/coreos/go-semver/semver" "go.uber.org/zap" diff --git a/etcdserver/api/snap/db.go b/etcdserver/api/snap/db.go index abf219c07..d096fc2f7 100644 --- a/etcdserver/api/snap/db.go +++ b/etcdserver/api/snap/db.go @@ -23,7 +23,7 @@ import ( "path/filepath" "time" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/fileutil" humanize "github.com/dustin/go-humanize" "go.uber.org/zap" diff --git a/etcdserver/api/snap/message.go b/etcdserver/api/snap/message.go index 9e626eb07..3442e3bdf 100644 --- a/etcdserver/api/snap/message.go +++ b/etcdserver/api/snap/message.go @@ -17,7 +17,7 @@ package snap import ( "io" - "go.etcd.io/etcd/v3/pkg/ioutil" + "go.etcd.io/etcd/pkg/v3/ioutil" "go.etcd.io/etcd/v3/raft/raftpb" ) diff --git a/etcdserver/api/snap/snapshotter.go b/etcdserver/api/snap/snapshotter.go index 78a0b6bd9..f02f1c763 100644 --- a/etcdserver/api/snap/snapshotter.go +++ b/etcdserver/api/snap/snapshotter.go @@ -26,9 +26,9 @@ import ( "strings" "time" + pioutil "go.etcd.io/etcd/pkg/v3/ioutil" + "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/v3/etcdserver/api/snap/snappb" - pioutil "go.etcd.io/etcd/v3/pkg/ioutil" - "go.etcd.io/etcd/v3/pkg/pbutil" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal/walpb" diff --git a/etcdserver/api/snap/snapshotter_test.go b/etcdserver/api/snap/snapshotter_test.go index 16d98d83f..5826e3750 100644 --- a/etcdserver/api/snap/snapshotter_test.go +++ b/etcdserver/api/snap/snapshotter_test.go @@ -23,7 +23,7 @@ import ( "reflect" "testing" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/fileutil" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal/walpb" "go.uber.org/zap" diff --git a/etcdserver/api/v2auth/auth.go b/etcdserver/api/v2auth/auth.go index 6cb4d676b..455e15f7f 100644 --- a/etcdserver/api/v2auth/auth.go +++ b/etcdserver/api/v2auth/auth.go @@ -27,9 +27,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api/v2error" - "go.etcd.io/etcd/v3/pkg/types" "go.uber.org/zap" "golang.org/x/crypto/bcrypt" diff --git a/etcdserver/api/v2discovery/discovery.go b/etcdserver/api/v2discovery/discovery.go index 634a40c23..3b03cf14b 100644 --- a/etcdserver/api/v2discovery/discovery.go +++ b/etcdserver/api/v2discovery/discovery.go @@ -29,9 +29,9 @@ import ( "strings" "time" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/client" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" "github.com/jonboulle/clockwork" "go.uber.org/zap" diff --git a/etcdserver/api/v2discovery/discovery_test.go b/etcdserver/api/v2discovery/discovery_test.go index c84088978..26b8ef11e 100644 --- a/etcdserver/api/v2discovery/discovery_test.go +++ b/etcdserver/api/v2discovery/discovery_test.go @@ -27,8 +27,8 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/client" - "go.etcd.io/etcd/v3/pkg/types" "github.com/jonboulle/clockwork" "go.uber.org/zap" diff --git a/etcdserver/api/v2http/client.go b/etcdserver/api/v2http/client.go index f8a93a7ce..0b1741834 100644 --- a/etcdserver/api/v2http/client.go +++ b/etcdserver/api/v2http/client.go @@ -28,6 +28,7 @@ import ( "time" "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api" "go.etcd.io/etcd/v3/etcdserver/api/etcdhttp" @@ -37,7 +38,6 @@ import ( "go.etcd.io/etcd/v3/etcdserver/api/v2http/httptypes" stats "go.etcd.io/etcd/v3/etcdserver/api/v2stats" "go.etcd.io/etcd/v3/etcdserver/api/v2store" - "go.etcd.io/etcd/v3/pkg/types" "github.com/jonboulle/clockwork" "go.uber.org/zap" diff --git a/etcdserver/api/v2http/client_test.go b/etcdserver/api/v2http/client_test.go index 2722d9701..f1298bec1 100644 --- a/etcdserver/api/v2http/client_test.go +++ b/etcdserver/api/v2http/client_test.go @@ -30,14 +30,14 @@ import ( "time" "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/v2error" "go.etcd.io/etcd/v3/etcdserver/api/v2http/httptypes" "go.etcd.io/etcd/v3/etcdserver/api/v2store" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "github.com/coreos/go-semver/semver" diff --git a/etcdserver/api/v2http/http_test.go b/etcdserver/api/v2http/http_test.go index cc0ddb099..c219040ad 100644 --- a/etcdserver/api/v2http/http_test.go +++ b/etcdserver/api/v2http/http_test.go @@ -23,10 +23,10 @@ import ( "testing" "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/v2error" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "github.com/coreos/go-semver/semver" diff --git a/etcdserver/api/v2http/httptypes/member.go b/etcdserver/api/v2http/httptypes/member.go index fefe6a020..2026be928 100644 --- a/etcdserver/api/v2http/httptypes/member.go +++ b/etcdserver/api/v2http/httptypes/member.go @@ -19,7 +19,7 @@ package httptypes import ( "encoding/json" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) type Member struct { diff --git a/etcdserver/api/v2http/httptypes/member_test.go b/etcdserver/api/v2http/httptypes/member_test.go index ea95550b2..75b8f4979 100644 --- a/etcdserver/api/v2http/httptypes/member_test.go +++ b/etcdserver/api/v2http/httptypes/member_test.go @@ -20,7 +20,7 @@ import ( "reflect" "testing" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) func TestMemberUnmarshal(t *testing.T) { diff --git a/etcdserver/api/v2store/node_extern_test.go b/etcdserver/api/v2store/node_extern_test.go index 0a99048f8..067cdc42d 100644 --- a/etcdserver/api/v2store/node_extern_test.go +++ b/etcdserver/api/v2store/node_extern_test.go @@ -20,7 +20,7 @@ import ( "time" "unsafe" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestNodeExternClone(t *testing.T) { diff --git a/etcdserver/api/v2store/stats_test.go b/etcdserver/api/v2store/stats_test.go index 3793d8f6d..1adb5ccbd 100644 --- a/etcdserver/api/v2store/stats_test.go +++ b/etcdserver/api/v2store/stats_test.go @@ -18,7 +18,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) // Ensure that a successful Get is recorded in the stats. diff --git a/etcdserver/api/v2store/store.go b/etcdserver/api/v2store/store.go index db16b44c5..afc894289 100644 --- a/etcdserver/api/v2store/store.go +++ b/etcdserver/api/v2store/store.go @@ -23,8 +23,8 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/v2error" - "go.etcd.io/etcd/v3/pkg/types" "github.com/jonboulle/clockwork" ) diff --git a/etcdserver/api/v2store/store_ttl_test.go b/etcdserver/api/v2store/store_ttl_test.go index 05e0db50e..fdf44c333 100644 --- a/etcdserver/api/v2store/store_ttl_test.go +++ b/etcdserver/api/v2store/store_ttl_test.go @@ -18,8 +18,8 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/etcdserver/api/v2error" - "go.etcd.io/etcd/v3/pkg/testutil" "github.com/jonboulle/clockwork" ) diff --git a/etcdserver/api/v2v3/cluster.go b/etcdserver/api/v2v3/cluster.go index 51e2b6534..e07610d1e 100644 --- a/etcdserver/api/v2v3/cluster.go +++ b/etcdserver/api/v2v3/cluster.go @@ -15,8 +15,8 @@ package v2v3 import ( + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/membership" - "go.etcd.io/etcd/v3/pkg/types" "github.com/coreos/go-semver/semver" ) diff --git a/etcdserver/api/v2v3/server.go b/etcdserver/api/v2v3/server.go index 773b688e1..19446affa 100644 --- a/etcdserver/api/v2v3/server.go +++ b/etcdserver/api/v2v3/server.go @@ -20,11 +20,11 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api" "go.etcd.io/etcd/v3/etcdserver/api/membership" - "go.etcd.io/etcd/v3/pkg/types" "github.com/coreos/go-semver/semver" "go.uber.org/zap" diff --git a/etcdserver/api/v3alarm/alarms.go b/etcdserver/api/v3alarm/alarms.go index e1035b537..fcad18cdf 100644 --- a/etcdserver/api/v3alarm/alarms.go +++ b/etcdserver/api/v3alarm/alarms.go @@ -19,8 +19,8 @@ import ( "sync" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/types" "go.uber.org/zap" ) diff --git a/etcdserver/api/v3compactor/compactor_test.go b/etcdserver/api/v3compactor/compactor_test.go index 1060ddb44..b4775f8d1 100644 --- a/etcdserver/api/v3compactor/compactor_test.go +++ b/etcdserver/api/v3compactor/compactor_test.go @@ -19,7 +19,7 @@ import ( "sync/atomic" pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) type fakeCompactable struct { diff --git a/etcdserver/api/v3compactor/periodic_test.go b/etcdserver/api/v3compactor/periodic_test.go index 08e4eddf3..40b351701 100644 --- a/etcdserver/api/v3compactor/periodic_test.go +++ b/etcdserver/api/v3compactor/periodic_test.go @@ -20,7 +20,7 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" "github.com/jonboulle/clockwork" "go.uber.org/zap" diff --git a/etcdserver/api/v3compactor/revision_test.go b/etcdserver/api/v3compactor/revision_test.go index 90ae6c7c1..0b8d164d6 100644 --- a/etcdserver/api/v3compactor/revision_test.go +++ b/etcdserver/api/v3compactor/revision_test.go @@ -20,7 +20,7 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" "github.com/jonboulle/clockwork" "go.uber.org/zap" diff --git a/etcdserver/api/v3rpc/interceptor.go b/etcdserver/api/v3rpc/interceptor.go index 3b31b6deb..622803f65 100644 --- a/etcdserver/api/v3rpc/interceptor.go +++ b/etcdserver/api/v3rpc/interceptor.go @@ -20,9 +20,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" pb "go.etcd.io/etcd/api/v3/etcdserverpb" diff --git a/etcdserver/api/v3rpc/key.go b/etcdserver/api/v3rpc/key.go index 748e9804a..ef71d83e8 100644 --- a/etcdserver/api/v3rpc/key.go +++ b/etcdserver/api/v3rpc/key.go @@ -20,8 +20,8 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/adt" "go.etcd.io/etcd/v3/etcdserver" - "go.etcd.io/etcd/v3/pkg/adt" ) type kvServer struct { diff --git a/etcdserver/api/v3rpc/member.go b/etcdserver/api/v3rpc/member.go index 394594c06..8739b6376 100644 --- a/etcdserver/api/v3rpc/member.go +++ b/etcdserver/api/v3rpc/member.go @@ -20,10 +20,10 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" "go.etcd.io/etcd/v3/etcdserver/api" "go.etcd.io/etcd/v3/etcdserver/api/membership" - "go.etcd.io/etcd/v3/pkg/types" ) type ClusterServer struct { diff --git a/etcdserver/api/v3rpc/quota.go b/etcdserver/api/v3rpc/quota.go index b26bd27a3..508f3ae66 100644 --- a/etcdserver/api/v3rpc/quota.go +++ b/etcdserver/api/v3rpc/quota.go @@ -19,8 +19,8 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver" - "go.etcd.io/etcd/v3/pkg/types" ) type quotaKVServer struct { diff --git a/etcdserver/apply.go b/etcdserver/apply.go index fc7667585..208dea1f1 100644 --- a/etcdserver/apply.go +++ b/etcdserver/apply.go @@ -25,13 +25,13 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/membershippb" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/traceutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/auth" "go.etcd.io/etcd/v3/etcdserver/api" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc" - "go.etcd.io/etcd/v3/pkg/traceutil" - "go.etcd.io/etcd/v3/pkg/types" "github.com/gogo/protobuf/proto" "go.uber.org/zap" diff --git a/etcdserver/apply_auth.go b/etcdserver/apply_auth.go index f36217a52..bc2112214 100644 --- a/etcdserver/apply_auth.go +++ b/etcdserver/apply_auth.go @@ -19,10 +19,10 @@ import ( "sync" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/auth" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc" - "go.etcd.io/etcd/v3/pkg/traceutil" ) type authApplierV3 struct { diff --git a/etcdserver/apply_v2.go b/etcdserver/apply_v2.go index 48bfc6685..8709e3f91 100644 --- a/etcdserver/apply_v2.go +++ b/etcdserver/apply_v2.go @@ -20,9 +20,9 @@ import ( "path" "time" + "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/v2store" - "go.etcd.io/etcd/v3/pkg/pbutil" "go.uber.org/zap" ) diff --git a/etcdserver/cluster_util.go b/etcdserver/cluster_util.go index 8b9edbb03..3fe85efe5 100644 --- a/etcdserver/cluster_util.go +++ b/etcdserver/cluster_util.go @@ -25,8 +25,8 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/membership" - "go.etcd.io/etcd/v3/pkg/types" "github.com/coreos/go-semver/semver" "go.uber.org/zap" diff --git a/etcdserver/cluster_util_test.go b/etcdserver/cluster_util_test.go index 8571cc08a..5a296ef3d 100644 --- a/etcdserver/cluster_util_test.go +++ b/etcdserver/cluster_util_test.go @@ -19,7 +19,7 @@ import ( "testing" "go.etcd.io/etcd/api/v3/version" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" "github.com/coreos/go-semver/semver" "go.uber.org/zap" diff --git a/etcdserver/config.go b/etcdserver/config.go index 773333756..6e7fdccfc 100644 --- a/etcdserver/config.go +++ b/etcdserver/config.go @@ -22,9 +22,9 @@ import ( "strings" "time" - "go.etcd.io/etcd/v3/pkg/netutil" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/netutil" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" bolt "go.etcd.io/bbolt" "go.uber.org/zap" diff --git a/etcdserver/config_test.go b/etcdserver/config_test.go index e91b5fe3b..9e2f0b919 100644 --- a/etcdserver/config_test.go +++ b/etcdserver/config_test.go @@ -18,7 +18,7 @@ import ( "net/url" "testing" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" "go.uber.org/zap" ) diff --git a/etcdserver/corrupt.go b/etcdserver/corrupt.go index a57b993d7..f8c754252 100644 --- a/etcdserver/corrupt.go +++ b/etcdserver/corrupt.go @@ -26,9 +26,9 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/traceutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/mvcc" - "go.etcd.io/etcd/v3/pkg/traceutil" - "go.etcd.io/etcd/v3/pkg/types" "go.uber.org/zap" ) diff --git a/etcdserver/metrics.go b/etcdserver/metrics.go index 502f9f739..e4a1d3bec 100644 --- a/etcdserver/metrics.go +++ b/etcdserver/metrics.go @@ -19,7 +19,7 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" - "go.etcd.io/etcd/v3/pkg/runtime" + "go.etcd.io/etcd/pkg/v3/runtime" "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" diff --git a/etcdserver/raft.go b/etcdserver/raft.go index 77933b219..ec7a5011f 100644 --- a/etcdserver/raft.go +++ b/etcdserver/raft.go @@ -24,12 +24,12 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/contention" + "go.etcd.io/etcd/pkg/v3/logutil" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/rafthttp" - "go.etcd.io/etcd/v3/pkg/contention" - "go.etcd.io/etcd/v3/pkg/logutil" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal" @@ -122,11 +122,11 @@ type raftNodeConfig struct { func newRaftNode(cfg raftNodeConfig) *raftNode { var lg raft.Logger if cfg.lg != nil { - lg = logutil.NewRaftLoggerZap(cfg.lg) + lg = NewRaftLoggerZap(cfg.lg) } else { lcfg := logutil.DefaultZapLoggerConfig var err error - lg, err = logutil.NewRaftLogger(&lcfg) + lg, err = NewRaftLogger(&lcfg) if err != nil { log.Fatalf("cannot create raft logger %v", err) } @@ -463,12 +463,12 @@ func startNode(cfg ServerConfig, cl *membership.RaftCluster, ids []types.ID) (id if cfg.Logger != nil { // called after capnslog setting in "init" function if cfg.LoggerConfig != nil { - c.Logger, err = logutil.NewRaftLogger(cfg.LoggerConfig) + c.Logger, err = NewRaftLogger(cfg.LoggerConfig) if err != nil { log.Fatalf("cannot create raft logger %v", err) } } else if cfg.LoggerCore != nil && cfg.LoggerWriteSyncer != nil { - c.Logger = logutil.NewRaftLoggerFromZapCore(cfg.LoggerCore, cfg.LoggerWriteSyncer) + c.Logger = NewRaftLoggerFromZapCore(cfg.LoggerCore, cfg.LoggerWriteSyncer) } } @@ -518,12 +518,12 @@ func restartNode(cfg ServerConfig, snapshot *raftpb.Snapshot) (types.ID, *member // called after capnslog setting in "init" function var err error if cfg.LoggerConfig != nil { - c.Logger, err = logutil.NewRaftLogger(cfg.LoggerConfig) + c.Logger, err = NewRaftLogger(cfg.LoggerConfig) if err != nil { log.Fatalf("cannot create raft logger %v", err) } } else if cfg.LoggerCore != nil && cfg.LoggerWriteSyncer != nil { - c.Logger = logutil.NewRaftLoggerFromZapCore(cfg.LoggerCore, cfg.LoggerWriteSyncer) + c.Logger = NewRaftLoggerFromZapCore(cfg.LoggerCore, cfg.LoggerWriteSyncer) } } @@ -602,12 +602,12 @@ func restartAsStandaloneNode(cfg ServerConfig, snapshot *raftpb.Snapshot) (types if cfg.Logger != nil { // called after capnslog setting in "init" function if cfg.LoggerConfig != nil { - c.Logger, err = logutil.NewRaftLogger(cfg.LoggerConfig) + c.Logger, err = NewRaftLogger(cfg.LoggerConfig) if err != nil { log.Fatalf("cannot create raft logger %v", err) } } else if cfg.LoggerCore != nil && cfg.LoggerWriteSyncer != nil { - c.Logger = logutil.NewRaftLoggerFromZapCore(cfg.LoggerCore, cfg.LoggerWriteSyncer) + c.Logger = NewRaftLoggerFromZapCore(cfg.LoggerCore, cfg.LoggerWriteSyncer) } } diff --git a/etcdserver/raft_test.go b/etcdserver/raft_test.go index 58067187e..d7a705899 100644 --- a/etcdserver/raft_test.go +++ b/etcdserver/raft_test.go @@ -22,12 +22,12 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/membership" - "go.etcd.io/etcd/v3/pkg/mock/mockstorage" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" + "go.etcd.io/etcd/v3/server/mock/mockstorage" "go.uber.org/zap" ) diff --git a/etcdserver/server.go b/etcdserver/server.go index fb5d04ea6..4b35ce615 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -37,6 +37,14 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/membershippb" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/idutil" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/runtime" + "go.etcd.io/etcd/pkg/v3/schedule" + "go.etcd.io/etcd/pkg/v3/traceutil" + "go.etcd.io/etcd/pkg/v3/types" + "go.etcd.io/etcd/pkg/v3/wait" "go.etcd.io/etcd/v3/auth" "go.etcd.io/etcd/v3/etcdserver/api" "go.etcd.io/etcd/v3/etcdserver/api/membership" @@ -53,14 +61,6 @@ import ( "go.etcd.io/etcd/v3/lease/leasehttp" "go.etcd.io/etcd/v3/mvcc" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/idutil" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/runtime" - "go.etcd.io/etcd/v3/pkg/schedule" - "go.etcd.io/etcd/v3/pkg/traceutil" - "go.etcd.io/etcd/v3/pkg/types" - "go.etcd.io/etcd/v3/pkg/wait" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal" diff --git a/etcdserver/server_test.go b/etcdserver/server_test.go index fb34d2283..cebe5020b 100644 --- a/etcdserver/server_test.go +++ b/etcdserver/server_test.go @@ -28,6 +28,12 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/idutil" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/types" + "go.etcd.io/etcd/pkg/v3/wait" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/rafthttp" "go.etcd.io/etcd/v3/etcdserver/api/snap" @@ -36,17 +42,11 @@ import ( "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/idutil" - "go.etcd.io/etcd/v3/pkg/mock/mockstorage" - "go.etcd.io/etcd/v3/pkg/mock/mockstore" - "go.etcd.io/etcd/v3/pkg/mock/mockwait" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/types" - "go.etcd.io/etcd/v3/pkg/wait" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" + "go.etcd.io/etcd/v3/server/mock/mockstorage" + "go.etcd.io/etcd/v3/server/mock/mockstore" + "go.etcd.io/etcd/v3/server/mock/mockwait" "go.uber.org/zap" ) diff --git a/etcdserver/storage.go b/etcdserver/storage.go index bf8b954d7..5f46a1cb0 100644 --- a/etcdserver/storage.go +++ b/etcdserver/storage.go @@ -18,9 +18,9 @@ import ( "io" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/snap" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal" "go.etcd.io/etcd/v3/wal/walpb" diff --git a/etcdserver/util.go b/etcdserver/util.go index c519cfbf7..78f8278f4 100644 --- a/etcdserver/util.go +++ b/etcdserver/util.go @@ -22,9 +22,9 @@ import ( "github.com/golang/protobuf/proto" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/rafthttp" - "go.etcd.io/etcd/v3/pkg/types" "go.uber.org/zap" ) diff --git a/etcdserver/util_test.go b/etcdserver/util_test.go index 8a5c54d72..6c92370d4 100644 --- a/etcdserver/util_test.go +++ b/etcdserver/util_test.go @@ -21,10 +21,10 @@ import ( "go.uber.org/zap" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/etcdserver/api/rafthttp" "go.etcd.io/etcd/v3/etcdserver/api/snap" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" ) diff --git a/etcdserver/v3_server.go b/etcdserver/v3_server.go index 4be2b519f..7a904dc1c 100644 --- a/etcdserver/v3_server.go +++ b/etcdserver/v3_server.go @@ -24,12 +24,12 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/membershippb" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/auth" "go.etcd.io/etcd/v3/etcdserver/api/membership" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/lease/leasehttp" "go.etcd.io/etcd/v3/mvcc" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.etcd.io/etcd/v3/raft" "github.com/gogo/protobuf/proto" diff --git a/pkg/logutil/zap_raft.go b/etcdserver/zap_raft.go similarity index 99% rename from pkg/logutil/zap_raft.go rename to etcdserver/zap_raft.go index f0772a17c..11115d217 100644 --- a/pkg/logutil/zap_raft.go +++ b/etcdserver/zap_raft.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package logutil +package etcdserver import ( "errors" diff --git a/pkg/logutil/zap_raft_test.go b/etcdserver/zap_raft_test.go similarity index 92% rename from pkg/logutil/zap_raft_test.go rename to etcdserver/zap_raft_test.go index 5724f1916..8fb0aa5c2 100644 --- a/pkg/logutil/zap_raft_test.go +++ b/etcdserver/zap_raft_test.go @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -package logutil +package etcdserver import ( "bytes" "fmt" + "go.etcd.io/etcd/pkg/v3/logutil" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" "io/ioutil" "os" "path/filepath" "strings" "testing" "time" - - "go.uber.org/zap" - "go.uber.org/zap/zapcore" ) func TestNewRaftLogger(t *testing.T) { @@ -40,7 +40,7 @@ func TestNewRaftLogger(t *testing.T) { Thereafter: 100, }, Encoding: "json", - EncoderConfig: DefaultZapLoggerConfig.EncoderConfig, + EncoderConfig: logutil.DefaultZapLoggerConfig.EncoderConfig, OutputPaths: []string{logPath}, ErrorOutputPaths: []string{logPath}, } @@ -66,7 +66,7 @@ func TestNewRaftLogger(t *testing.T) { if !bytes.Contains(data, []byte("etcd-logutil-2")) { t.Fatalf("can't find data in log %q", string(data)) } - if !bytes.Contains(data, []byte("logutil/zap_raft_test.go:")) { + if !bytes.Contains(data, []byte("zap_raft_test.go:")) { t.Fatalf("unexpected caller; %q", string(data)) } } diff --git a/go.mod b/go.mod index 71488e564..f326251c8 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,12 @@ module go.etcd.io/etcd/v3 -go 1.14 +go 1.15 require ( github.com/bgentry/speakeasy v0.1.0 github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa github.com/coreos/go-semver v0.2.0 github.com/coreos/go-systemd/v22 v22.0.0 - github.com/creack/pty v1.1.11 github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 github.com/fatih/color v1.7.0 // indirect @@ -39,10 +38,10 @@ require ( github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 go.etcd.io/bbolt v1.3.5 go.etcd.io/etcd/api/v3 v3.0.0-00010101000000-000000000000 + go.etcd.io/etcd/pkg/v3 v3.0.0-00010101000000-000000000000 go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 - golang.org/x/sys v0.0.0-20200918174421-af09f7315aff golang.org/x/text v0.3.3 // indirect golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 google.golang.org/grpc v1.26.0 @@ -50,8 +49,14 @@ require ( sigs.k8s.io/yaml v1.1.0 ) +replace ( + go.etcd.io/etcd/api/v3 => ./api + go.etcd.io/etcd/pkg/v3 => ./pkg +) + // Bad imports are sometimes causing attempts to pull that code. // This makes the error more explicit. -replace go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY - -replace go.etcd.io/etcd/api/v3 => ./api +replace ( + go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY + go.etcd.io/tests/v3 => ./FORBIDDEN_DEPENDENCY +) diff --git a/go.sum b/go.sum index 8e0301f3d..96fa04e59 100644 --- a/go.sum +++ b/go.sum @@ -16,7 +16,6 @@ github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazu github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -182,8 +181,8 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200918174421-af09f7315aff h1:1CPUrky56AcgSpxz/KfgzQWzfG09u5YOL8MvPYBlrL8= -golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 h1:bNEHhJCnrwMKNMmOx3yAynp5vs5/gRy+XWFtZFu7NBM= +golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/lease/leasehttp/http.go b/lease/leasehttp/http.go index 933b0b737..6f2c7a680 100644 --- a/lease/leasehttp/http.go +++ b/lease/leasehttp/http.go @@ -24,9 +24,9 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/httputil" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/lease/leasepb" - "go.etcd.io/etcd/v3/pkg/httputil" ) var ( diff --git a/mvcc/kv.go b/mvcc/kv.go index 0b8831610..c9737911a 100644 --- a/mvcc/kv.go +++ b/mvcc/kv.go @@ -16,9 +16,9 @@ package mvcc import ( "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/traceutil" ) type RangeOptions struct { diff --git a/mvcc/kv_test.go b/mvcc/kv_test.go index 03dd3b04d..cb5c7408c 100644 --- a/mvcc/kv_test.go +++ b/mvcc/kv_test.go @@ -22,10 +22,10 @@ import ( "time" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/traceutil" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" diff --git a/mvcc/kv_view.go b/mvcc/kv_view.go index 795316a28..b38297f1f 100644 --- a/mvcc/kv_view.go +++ b/mvcc/kv_view.go @@ -15,8 +15,8 @@ package mvcc import ( + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/lease" - "go.etcd.io/etcd/v3/pkg/traceutil" ) type readView struct{ kv KV } diff --git a/mvcc/kvstore.go b/mvcc/kvstore.go index ac6a7735f..e719cc223 100644 --- a/mvcc/kvstore.go +++ b/mvcc/kvstore.go @@ -24,11 +24,11 @@ import ( "time" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/schedule" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/etcdserver/cindex" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/schedule" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.uber.org/zap" ) diff --git a/mvcc/kvstore_bench_test.go b/mvcc/kvstore_bench_test.go index 3f85cfa3c..aa2a4ba60 100644 --- a/mvcc/kvstore_bench_test.go +++ b/mvcc/kvstore_bench_test.go @@ -17,10 +17,10 @@ package mvcc import ( "testing" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/etcdserver/cindex" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.uber.org/zap" ) diff --git a/mvcc/kvstore_compaction_test.go b/mvcc/kvstore_compaction_test.go index 6eec26d3d..6ea653b9c 100644 --- a/mvcc/kvstore_compaction_test.go +++ b/mvcc/kvstore_compaction_test.go @@ -20,9 +20,9 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.uber.org/zap" ) diff --git a/mvcc/kvstore_test.go b/mvcc/kvstore_test.go index 81d519562..8c3874a8d 100644 --- a/mvcc/kvstore_test.go +++ b/mvcc/kvstore_test.go @@ -30,11 +30,11 @@ import ( "time" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/schedule" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/schedule" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.uber.org/zap" ) diff --git a/mvcc/kvstore_txn.go b/mvcc/kvstore_txn.go index c1d3b7f57..8b2e465aa 100644 --- a/mvcc/kvstore_txn.go +++ b/mvcc/kvstore_txn.go @@ -16,9 +16,9 @@ package mvcc import ( "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.uber.org/zap" ) diff --git a/mvcc/watchable_store.go b/mvcc/watchable_store.go index 42f6b455a..23429a270 100644 --- a/mvcc/watchable_store.go +++ b/mvcc/watchable_store.go @@ -19,10 +19,10 @@ import ( "time" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/etcdserver/cindex" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.uber.org/zap" ) diff --git a/mvcc/watchable_store_bench_test.go b/mvcc/watchable_store_bench_test.go index 53480f86a..7471fd6ec 100644 --- a/mvcc/watchable_store_bench_test.go +++ b/mvcc/watchable_store_bench_test.go @@ -19,10 +19,10 @@ import ( "os" "testing" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/etcdserver/cindex" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.uber.org/zap" ) diff --git a/mvcc/watchable_store_test.go b/mvcc/watchable_store_test.go index 48047d2ca..213bea647 100644 --- a/mvcc/watchable_store_test.go +++ b/mvcc/watchable_store_test.go @@ -24,10 +24,10 @@ import ( "time" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/etcdserver/cindex" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.uber.org/zap" ) diff --git a/mvcc/watchable_store_txn.go b/mvcc/watchable_store_txn.go index bc3dc85c7..b70d8ceca 100644 --- a/mvcc/watchable_store_txn.go +++ b/mvcc/watchable_store_txn.go @@ -16,7 +16,7 @@ package mvcc import ( "go.etcd.io/etcd/api/v3/mvccpb" - "go.etcd.io/etcd/v3/pkg/traceutil" + "go.etcd.io/etcd/pkg/v3/traceutil" ) func (tw *watchableStoreTxnWrite) End() { diff --git a/mvcc/watcher_group.go b/mvcc/watcher_group.go index 3bad9f281..356b49e64 100644 --- a/mvcc/watcher_group.go +++ b/mvcc/watcher_group.go @@ -19,7 +19,7 @@ import ( "math" "go.etcd.io/etcd/api/v3/mvccpb" - "go.etcd.io/etcd/v3/pkg/adt" + "go.etcd.io/etcd/pkg/v3/adt" ) var ( diff --git a/pkg/LICENSE b/pkg/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/pkg/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/pkg/adt/README.md b/pkg/adt/README.md index 1b59327e8..107c6bcae 100644 --- a/pkg/adt/README.md +++ b/pkg/adt/README.md @@ -16,7 +16,7 @@ For example, import ( "fmt" - "go.etcd.io/etcd/v3/pkg/adt" + "go.etcd.io/etcd/pkg/v3/adt" ) func main() { diff --git a/pkg/adt/example_test.go b/pkg/adt/example_test.go index 89dd5860b..034f7b3c4 100644 --- a/pkg/adt/example_test.go +++ b/pkg/adt/example_test.go @@ -17,7 +17,7 @@ package adt_test import ( "fmt" - "go.etcd.io/etcd/v3/pkg/adt" + "go.etcd.io/etcd/pkg/v3/adt" ) func Example() { diff --git a/pkg/flags/unique_urls.go b/pkg/flags/unique_urls.go index 2f9b206e6..4819b11f4 100644 --- a/pkg/flags/unique_urls.go +++ b/pkg/flags/unique_urls.go @@ -21,7 +21,7 @@ import ( "sort" "strings" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) // UniqueURLs contains unique URLs diff --git a/pkg/flags/urls.go b/pkg/flags/urls.go index 47b39c662..be399be42 100644 --- a/pkg/flags/urls.go +++ b/pkg/flags/urls.go @@ -20,7 +20,7 @@ import ( "net/url" "strings" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) // URLsValue wraps "types.URLs". diff --git a/pkg/go.mod b/pkg/go.mod new file mode 100644 index 000000000..975fb6382 --- /dev/null +++ b/pkg/go.mod @@ -0,0 +1,20 @@ +module go.etcd.io/etcd/pkg/v3 + +go 1.15 + +require ( + github.com/coreos/go-systemd/v22 v22.0.0 + github.com/creack/pty v1.1.11 + github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 + github.com/spf13/pflag v1.0.1 + go.uber.org/zap v1.15.0 + golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 + google.golang.org/grpc v1.26.0 +) + +replace ( + go.etcd.io/etcd => ./FORBIDDEN_DEPENDENCY + go.etcd.io/etcd/api/v3 => ./FORBIDDEN_DEPENDENCY + go.etcd.io/etcd/tests/v3 => ./FORBIDDEN_DEPENDENCY + go.etcd.io/etcd/v3 => ./FORBIDDEN_DEPENDENCY +) diff --git a/pkg/go.sum b/pkg/go.sum new file mode 100644 index 000000000..90753f666 --- /dev/null +++ b/pkg/go.sum @@ -0,0 +1,101 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 h1:bNEHhJCnrwMKNMmOx3yAynp5vs5/gRy+XWFtZFu7NBM= +golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/pkg/ioutil/util.go b/pkg/ioutil/util.go index cf0b360af..a137b4183 100644 --- a/pkg/ioutil/util.go +++ b/pkg/ioutil/util.go @@ -18,7 +18,7 @@ import ( "io" "os" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/fileutil" ) // WriteAndSyncFile behaves just like ioutil.WriteFile in the standard library, diff --git a/pkg/logutil/logger_test.go b/pkg/logutil/logger_test.go index 9ec21da88..4e913b6db 100644 --- a/pkg/logutil/logger_test.go +++ b/pkg/logutil/logger_test.go @@ -20,7 +20,7 @@ import ( "strings" "testing" - "go.etcd.io/etcd/v3/pkg/logutil" + "go.etcd.io/etcd/pkg/v3/logutil" "google.golang.org/grpc/grpclog" ) diff --git a/pkg/logutil/zap_journal.go b/pkg/logutil/zap_journal.go index 96250de42..9ebf94bd7 100644 --- a/pkg/logutil/zap_journal.go +++ b/pkg/logutil/zap_journal.go @@ -24,7 +24,7 @@ import ( "os" "path/filepath" - "go.etcd.io/etcd/v3/pkg/systemd" + "go.etcd.io/etcd/pkg/v3/systemd" "github.com/coreos/go-systemd/v22/journal" "go.uber.org/zap/zapcore" diff --git a/pkg/netutil/netutil.go b/pkg/netutil/netutil.go index f18bbe0c7..552244af4 100644 --- a/pkg/netutil/netutil.go +++ b/pkg/netutil/netutil.go @@ -23,7 +23,7 @@ import ( "sort" "time" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" "go.uber.org/zap" ) diff --git a/pkg/netutil/routes_linux.go b/pkg/netutil/routes_linux.go index b87ef9d05..bca4f8a9e 100644 --- a/pkg/netutil/routes_linux.go +++ b/pkg/netutil/routes_linux.go @@ -24,7 +24,7 @@ import ( "sort" "syscall" - "go.etcd.io/etcd/v3/pkg/cpuutil" + "go.etcd.io/etcd/pkg/v3/cpuutil" ) var errNoDefaultRoute = fmt.Errorf("could not find default route") diff --git a/pkg/proxy/server.go b/pkg/proxy/server.go index ef22ea2ff..40a13522b 100644 --- a/pkg/proxy/server.go +++ b/pkg/proxy/server.go @@ -26,7 +26,7 @@ import ( "sync" "time" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/transport" humanize "github.com/dustin/go-humanize" "go.uber.org/zap" diff --git a/pkg/proxy/server_test.go b/pkg/proxy/server_test.go index 4f913b204..5e997dd7f 100644 --- a/pkg/proxy/server_test.go +++ b/pkg/proxy/server_test.go @@ -29,7 +29,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/transport" "go.uber.org/zap" ) diff --git a/pkg/srv/srv.go b/pkg/srv/srv.go index 5e20f4099..634cf710e 100644 --- a/pkg/srv/srv.go +++ b/pkg/srv/srv.go @@ -21,7 +21,7 @@ import ( "net/url" "strings" - "go.etcd.io/etcd/v3/pkg/types" + "go.etcd.io/etcd/pkg/v3/types" ) var ( diff --git a/pkg/srv/srv_test.go b/pkg/srv/srv_test.go index f7b7b1ab7..8ff8ea8bd 100644 --- a/pkg/srv/srv_test.go +++ b/pkg/srv/srv_test.go @@ -21,7 +21,7 @@ import ( "strings" "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestSRVGetCluster(t *testing.T) { diff --git a/pkg/testutil/leak.go b/pkg/testutil/leak.go index 85554bae8..1255caff3 100644 --- a/pkg/testutil/leak.go +++ b/pkg/testutil/leak.go @@ -21,7 +21,7 @@ CheckLeakedGoroutine verifies tests do not leave any leaky goroutines. It returns true when there are goroutines still running(leaking) after all tests. - import "go.etcd.io/etcd/v3/pkg/testutil" + import "go.etcd.io/etcd/pkg/v3/testutil" func TestMain(m *testing.M) { testutil.MustTestMainWithLeakDetection(m) @@ -116,8 +116,8 @@ func interestingGoroutines() (gs []string) { strings.Contains(stack, "created by testing.runTests") || strings.Contains(stack, "testing.Main(") || strings.Contains(stack, "runtime.goexit") || - strings.Contains(stack, "go.etcd.io/etcd/v3/pkg/testutil.interestingGoroutines") || - strings.Contains(stack, "go.etcd.io/etcd/v3/pkg/logutil.(*MergeLogger).outputLoop") || + strings.Contains(stack, "go.etcd.io/etcd/pkg/v3/testutil.interestingGoroutines") || + strings.Contains(stack, "go.etcd.io/etcd/pkg/v3/logutil.(*MergeLogger).outputLoop") || strings.Contains(stack, "github.com/golang/glog.(*loggingT).flushDaemon") || strings.Contains(stack, "created by runtime.gc") || strings.Contains(stack, "created by text/template/parse.lex") || diff --git a/pkg/transport/listener.go b/pkg/transport/listener.go index f1522b1ce..d95b28c4e 100644 --- a/pkg/transport/listener.go +++ b/pkg/transport/listener.go @@ -31,8 +31,8 @@ import ( "strings" "time" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/tlsutil" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/tlsutil" "go.uber.org/zap" ) diff --git a/pkg/types/urls_test.go b/pkg/types/urls_test.go index 98a698ff7..15a81f59e 100644 --- a/pkg/types/urls_test.go +++ b/pkg/types/urls_test.go @@ -18,7 +18,7 @@ import ( "reflect" "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestNewURLs(t *testing.T) { diff --git a/pkg/types/urlsmap_test.go b/pkg/types/urlsmap_test.go index 8ffd06240..c0b84086c 100644 --- a/pkg/types/urlsmap_test.go +++ b/pkg/types/urlsmap_test.go @@ -15,7 +15,7 @@ package types import ( - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" "reflect" "testing" ) diff --git a/proxy/grpcproxy/cache/store.go b/proxy/grpcproxy/cache/store.go index e85c691a3..2c189644a 100644 --- a/proxy/grpcproxy/cache/store.go +++ b/proxy/grpcproxy/cache/store.go @@ -23,7 +23,7 @@ import ( "github.com/golang/groupcache/lru" pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/v3/pkg/adt" + "go.etcd.io/etcd/pkg/v3/adt" ) var ( diff --git a/raft/node_test.go b/raft/node_test.go index cee61cf49..31c13197c 100644 --- a/raft/node_test.go +++ b/raft/node_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/raft/raftpb" ) diff --git a/scripts/test_lib.sh b/scripts/test_lib.sh index cb7b40f45..f14c887e5 100644 --- a/scripts/test_lib.sh +++ b/scripts/test_lib.sh @@ -92,7 +92,7 @@ function run_for_module { } function modules() { - echo "go.etcd.io/etcd/v3 go.etcd.io/etcd/tests/v3" + echo "go.etcd.io/etcd/api/v3 go.etcd.io/etcd/pkg/v3 go.etcd.io/etcd/v3 go.etcd.io/etcd/tests/v3" } function modules_exp() { @@ -108,6 +108,7 @@ function run_for_modules { local pkg="${PKG:-./...}" if [ -z "${USERMOD}" ]; then run_for_module "api" "$@" "${pkg}" || return "$?" + run_for_module "pkg" "$@" "${pkg}" || return "$?" run_for_module "." "$@" "${pkg}" || return "$?" run_for_module "tests" "$@" "${pkg}" || return "$?" else diff --git a/pkg/mock/mockstorage/doc.go b/server/mock/mockstorage/doc.go similarity index 100% rename from pkg/mock/mockstorage/doc.go rename to server/mock/mockstorage/doc.go diff --git a/pkg/mock/mockstorage/storage_recorder.go b/server/mock/mockstorage/storage_recorder.go similarity index 97% rename from pkg/mock/mockstorage/storage_recorder.go rename to server/mock/mockstorage/storage_recorder.go index d30486687..64e13bddf 100644 --- a/pkg/mock/mockstorage/storage_recorder.go +++ b/server/mock/mockstorage/storage_recorder.go @@ -15,7 +15,7 @@ package mockstorage import ( - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" ) diff --git a/pkg/mock/mockstore/doc.go b/server/mock/mockstore/doc.go similarity index 100% rename from pkg/mock/mockstore/doc.go rename to server/mock/mockstore/doc.go diff --git a/pkg/mock/mockstore/store_recorder.go b/server/mock/mockstore/store_recorder.go similarity index 99% rename from pkg/mock/mockstore/store_recorder.go rename to server/mock/mockstore/store_recorder.go index 386b266bf..0f4d861f3 100644 --- a/pkg/mock/mockstore/store_recorder.go +++ b/server/mock/mockstore/store_recorder.go @@ -17,8 +17,8 @@ package mockstore import ( "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/etcdserver/api/v2store" - "go.etcd.io/etcd/v3/pkg/testutil" ) // StoreRecorder provides a Store interface with a testutil.Recorder diff --git a/pkg/mock/mockwait/doc.go b/server/mock/mockwait/doc.go similarity index 100% rename from pkg/mock/mockwait/doc.go rename to server/mock/mockwait/doc.go diff --git a/pkg/mock/mockwait/wait_recorder.go b/server/mock/mockwait/wait_recorder.go similarity index 94% rename from pkg/mock/mockwait/wait_recorder.go rename to server/mock/mockwait/wait_recorder.go index f6bd657d4..d574bf57d 100644 --- a/pkg/mock/mockwait/wait_recorder.go +++ b/server/mock/mockwait/wait_recorder.go @@ -15,8 +15,8 @@ package mockwait import ( - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/wait" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/wait" ) type WaitRecorder struct { diff --git a/tests/e2e/cluster_proxy_test.go b/tests/e2e/cluster_proxy_test.go index 5ae8ad10b..163ef7490 100644 --- a/tests/e2e/cluster_proxy_test.go +++ b/tests/e2e/cluster_proxy_test.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "go.etcd.io/etcd/v3/pkg/expect" + "go.etcd.io/etcd/pkg/v3/expect" ) type proxyEtcdProcess struct { diff --git a/tests/e2e/ctl_v2_test.go b/tests/e2e/ctl_v2_test.go index b2a3ebf22..96e27da23 100644 --- a/tests/e2e/ctl_v2_test.go +++ b/tests/e2e/ctl_v2_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestCtlV2Set(t *testing.T) { testCtlV2Set(t, &configNoTLS, false) } diff --git a/tests/e2e/ctl_v3_elect_test.go b/tests/e2e/ctl_v3_elect_test.go index d0dc6fa4f..c3fb90ac1 100644 --- a/tests/e2e/ctl_v3_elect_test.go +++ b/tests/e2e/ctl_v3_elect_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/expect" + "go.etcd.io/etcd/pkg/v3/expect" ) func TestCtlV3Elect(t *testing.T) { diff --git a/tests/e2e/ctl_v3_lock_test.go b/tests/e2e/ctl_v3_lock_test.go index 2d79bc2a3..2bcc5a823 100644 --- a/tests/e2e/ctl_v3_lock_test.go +++ b/tests/e2e/ctl_v3_lock_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/expect" + "go.etcd.io/etcd/pkg/v3/expect" ) func TestCtlV3Lock(t *testing.T) { diff --git a/tests/e2e/ctl_v3_migrate_test.go b/tests/e2e/ctl_v3_migrate_test.go index 715ca36aa..07eeef135 100644 --- a/tests/e2e/ctl_v3_migrate_test.go +++ b/tests/e2e/ctl_v3_migrate_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestCtlV3Migrate(t *testing.T) { diff --git a/tests/e2e/ctl_v3_move_leader_test.go b/tests/e2e/ctl_v3_move_leader_test.go index 521820eac..43a0b3ce4 100644 --- a/tests/e2e/ctl_v3_move_leader_test.go +++ b/tests/e2e/ctl_v3_move_leader_test.go @@ -22,10 +22,10 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" ) func TestCtlV3MoveLeaderSecure(t *testing.T) { diff --git a/tests/e2e/ctl_v3_snapshot_test.go b/tests/e2e/ctl_v3_snapshot_test.go index c3c8cd9be..f40933be5 100644 --- a/tests/e2e/ctl_v3_snapshot_test.go +++ b/tests/e2e/ctl_v3_snapshot_test.go @@ -25,9 +25,9 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/expect" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/etcdctl/snapshot" - "go.etcd.io/etcd/v3/pkg/expect" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestCtlV3Snapshot(t *testing.T) { testCtl(t, snapshotTest) } diff --git a/tests/e2e/ctl_v3_test.go b/tests/e2e/ctl_v3_test.go index 532e2fddf..86dedd2d9 100644 --- a/tests/e2e/ctl_v3_test.go +++ b/tests/e2e/ctl_v3_test.go @@ -22,9 +22,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/flags" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/flags" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestCtlV3Version(t *testing.T) { testCtl(t, versionTest) } diff --git a/tests/e2e/etcd_config_test.go b/tests/e2e/etcd_config_test.go index f0389f404..d580f641d 100644 --- a/tests/e2e/etcd_config_test.go +++ b/tests/e2e/etcd_config_test.go @@ -21,7 +21,7 @@ import ( "strings" "testing" - "go.etcd.io/etcd/v3/pkg/expect" + "go.etcd.io/etcd/pkg/v3/expect" ) const exampleConfigFile = "../../etcd.conf.yml.sample" diff --git a/tests/e2e/etcd_process.go b/tests/e2e/etcd_process.go index 57a09020f..74ca20d71 100644 --- a/tests/e2e/etcd_process.go +++ b/tests/e2e/etcd_process.go @@ -19,8 +19,8 @@ import ( "net/url" "os" - "go.etcd.io/etcd/v3/pkg/expect" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/expect" + "go.etcd.io/etcd/pkg/v3/fileutil" ) var ( diff --git a/tests/e2e/etcd_release_upgrade_test.go b/tests/e2e/etcd_release_upgrade_test.go index 3f666745f..c2a714d01 100644 --- a/tests/e2e/etcd_release_upgrade_test.go +++ b/tests/e2e/etcd_release_upgrade_test.go @@ -22,8 +22,8 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) // TestReleaseUpgrade ensures that changes to master branch does not affect diff --git a/tests/e2e/etcd_spawn_cov.go b/tests/e2e/etcd_spawn_cov.go index 91fe505d5..0615ef09f 100644 --- a/tests/e2e/etcd_spawn_cov.go +++ b/tests/e2e/etcd_spawn_cov.go @@ -24,8 +24,8 @@ import ( "syscall" "time" - "go.etcd.io/etcd/v3/pkg/expect" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/expect" + "go.etcd.io/etcd/pkg/v3/fileutil" ) const noOutputLineCount = 2 // cov-enabled binaries emit PASS and coverage count lines diff --git a/tests/e2e/etcd_spawn_nocov.go b/tests/e2e/etcd_spawn_nocov.go index 88e91733f..8a4dd81a1 100644 --- a/tests/e2e/etcd_spawn_nocov.go +++ b/tests/e2e/etcd_spawn_nocov.go @@ -19,7 +19,7 @@ package e2e import ( "os" - "go.etcd.io/etcd/v3/pkg/expect" + "go.etcd.io/etcd/pkg/v3/expect" ) const noOutputLineCount = 0 // regular binaries emit no extra lines diff --git a/tests/e2e/gateway_test.go b/tests/e2e/gateway_test.go index 809c3e37d..1c775599f 100644 --- a/tests/e2e/gateway_test.go +++ b/tests/e2e/gateway_test.go @@ -19,7 +19,7 @@ import ( "strings" "testing" - "go.etcd.io/etcd/v3/pkg/expect" + "go.etcd.io/etcd/pkg/v3/expect" ) var ( diff --git a/tests/e2e/main_test.go b/tests/e2e/main_test.go index c1d61ce1d..22fb153f7 100644 --- a/tests/e2e/main_test.go +++ b/tests/e2e/main_test.go @@ -10,7 +10,7 @@ import ( "runtime" "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) var ( diff --git a/tests/e2e/util.go b/tests/e2e/util.go index a4d7fe2de..d05ecb141 100644 --- a/tests/e2e/util.go +++ b/tests/e2e/util.go @@ -22,8 +22,8 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/expect" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/expect" + "go.etcd.io/etcd/pkg/v3/testutil" ) func waitReadyExpectProc(exproc *expect.ExpectProcess, readyStrs []string) error { diff --git a/tests/e2e/v2_curl_test.go b/tests/e2e/v2_curl_test.go index dc94365b3..9c1d105d0 100644 --- a/tests/e2e/v2_curl_test.go +++ b/tests/e2e/v2_curl_test.go @@ -21,7 +21,7 @@ import ( "strings" "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestV2CurlNoTLS(t *testing.T) { testCurlPutGet(t, &configNoTLS) } diff --git a/tests/e2e/v3_curl_test.go b/tests/e2e/v3_curl_test.go index 76e24204c..41814ff07 100644 --- a/tests/e2e/v3_curl_test.go +++ b/tests/e2e/v3_curl_test.go @@ -25,8 +25,8 @@ import ( "go.etcd.io/etcd/api/v3/authpb" pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" epb "go.etcd.io/etcd/v3/etcdserver/api/v3election/v3electionpb" - "go.etcd.io/etcd/v3/pkg/testutil" "github.com/grpc-ecosystem/grpc-gateway/runtime" ) diff --git a/tests/functional/agent/handler.go b/tests/functional/agent/handler.go index 761964495..e59c9038b 100644 --- a/tests/functional/agent/handler.go +++ b/tests/functional/agent/handler.go @@ -25,9 +25,9 @@ import ( "syscall" "time" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/proxy" "go.etcd.io/etcd/tests/v3/functional/rpcpb" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/proxy" "go.uber.org/zap" ) diff --git a/tests/functional/agent/server.go b/tests/functional/agent/server.go index ad38cf2e3..85070ca28 100644 --- a/tests/functional/agent/server.go +++ b/tests/functional/agent/server.go @@ -21,9 +21,9 @@ import ( "os/exec" "strings" + "go.etcd.io/etcd/pkg/v3/proxy" "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/embed" - "go.etcd.io/etcd/v3/pkg/proxy" "go.uber.org/zap" "google.golang.org/grpc" diff --git a/tests/functional/agent/utils.go b/tests/functional/agent/utils.go index d0f44b4af..45ea66333 100644 --- a/tests/functional/agent/utils.go +++ b/tests/functional/agent/utils.go @@ -24,7 +24,7 @@ import ( "strconv" "time" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/fileutil" ) // TODO: support separate WAL directory diff --git a/tests/functional/cmd/etcd-proxy/main.go b/tests/functional/cmd/etcd-proxy/main.go index 5695e91b8..8f5561f08 100644 --- a/tests/functional/cmd/etcd-proxy/main.go +++ b/tests/functional/cmd/etcd-proxy/main.go @@ -28,7 +28,7 @@ import ( "syscall" "time" - "go.etcd.io/etcd/v3/pkg/proxy" + "go.etcd.io/etcd/pkg/v3/proxy" "go.uber.org/zap" ) diff --git a/tests/functional/rpcpb/member.go b/tests/functional/rpcpb/member.go index 208fb88f7..6fbd44e14 100644 --- a/tests/functional/rpcpb/member.go +++ b/tests/functional/rpcpb/member.go @@ -23,10 +23,10 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/logutil" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/etcdctl/snapshot" - "go.etcd.io/etcd/v3/pkg/logutil" - "go.etcd.io/etcd/v3/pkg/transport" "github.com/dustin/go-humanize" "go.uber.org/zap" diff --git a/tests/functional/runner/watch_command.go b/tests/functional/runner/watch_command.go index c9e36dc00..32f074bc3 100644 --- a/tests/functional/runner/watch_command.go +++ b/tests/functional/runner/watch_command.go @@ -22,8 +22,8 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/stringutil" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/stringutil" "github.com/spf13/cobra" "golang.org/x/time/rate" diff --git a/tests/functional/tester/cluster.go b/tests/functional/tester/cluster.go index 0a69cb294..72e458162 100644 --- a/tests/functional/tester/cluster.go +++ b/tests/functional/tester/cluster.go @@ -29,9 +29,9 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/debugutil" + "go.etcd.io/etcd/pkg/v3/fileutil" "go.etcd.io/etcd/tests/v3/functional/rpcpb" - "go.etcd.io/etcd/v3/pkg/debugutil" - "go.etcd.io/etcd/v3/pkg/fileutil" "github.com/prometheus/client_golang/prometheus/promhttp" "go.uber.org/zap" diff --git a/tests/functional/tester/cluster_run.go b/tests/functional/tester/cluster_run.go index 74cca6ddd..d73f60d84 100644 --- a/tests/functional/tester/cluster_run.go +++ b/tests/functional/tester/cluster_run.go @@ -19,8 +19,8 @@ import ( "os" "time" + "go.etcd.io/etcd/pkg/v3/fileutil" "go.etcd.io/etcd/tests/v3/functional/rpcpb" - "go.etcd.io/etcd/v3/pkg/fileutil" "go.uber.org/zap" ) diff --git a/tests/go.mod b/tests/go.mod index 37259f85e..28b3555fb 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -2,9 +2,11 @@ module go.etcd.io/etcd/tests/v3 go 1.15 -replace go.etcd.io/etcd/v3 => ../ - -replace go.etcd.io/etcd/api/v3 => ../api +replace ( + go.etcd.io/etcd/api/v3 => ../api + go.etcd.io/etcd/pkg/v3 => ../pkg + go.etcd.io/etcd/v3 => ../ +) require ( github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 @@ -19,6 +21,7 @@ require ( github.com/spf13/pflag v1.0.1 go.etcd.io/bbolt v1.3.5 go.etcd.io/etcd/api/v3 v3.0.0-00010101000000-000000000000 + go.etcd.io/etcd/pkg/v3 v3.0.0-00010101000000-000000000000 go.etcd.io/etcd/v3 v3.0.0-00010101000000-000000000000 go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc diff --git a/tests/go.sum b/tests/go.sum index e787c0b3c..bdb32342b 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -177,8 +177,8 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200918174421-af09f7315aff h1:1CPUrky56AcgSpxz/KfgzQWzfG09u5YOL8MvPYBlrL8= -golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 h1:bNEHhJCnrwMKNMmOx3yAynp5vs5/gRy+XWFtZFu7NBM= +golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/tests/integration/bridge.go b/tests/integration/bridge.go index cedd16d35..88e1c5813 100644 --- a/tests/integration/bridge.go +++ b/tests/integration/bridge.go @@ -21,7 +21,7 @@ import ( "net" "sync" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/transport" ) // bridge creates a unix socket bridge to another unix socket, making it possible diff --git a/tests/integration/client/client_test.go b/tests/integration/client/client_test.go index 0cb37ff09..48ba35979 100644 --- a/tests/integration/client/client_test.go +++ b/tests/integration/client/client_test.go @@ -24,9 +24,9 @@ import ( "sync/atomic" "testing" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/client" - "go.etcd.io/etcd/v3/pkg/testutil" ) // TestV2NoRetryEOF tests destructive api calls won't retry on a disconnection. diff --git a/tests/integration/client/examples/main_test.go b/tests/integration/client/examples/main_test.go index fcc1085a4..eea210ead 100644 --- a/tests/integration/client/examples/main_test.go +++ b/tests/integration/client/examples/main_test.go @@ -19,8 +19,8 @@ import ( "os" "testing" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" - "go.etcd.io/etcd/v3/pkg/testutil" ) var lazyCluster = integration.NewLazyCluster() diff --git a/tests/integration/client/main_test.go b/tests/integration/client/main_test.go index 0e2151345..a4c8fd237 100644 --- a/tests/integration/client/main_test.go +++ b/tests/integration/client/main_test.go @@ -7,7 +7,7 @@ package integration import ( "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestMain(m *testing.M) { diff --git a/tests/integration/clientv3/black_hole_test.go b/tests/integration/clientv3/black_hole_test.go index e981f5006..bcb8d7943 100644 --- a/tests/integration/clientv3/black_hole_test.go +++ b/tests/integration/clientv3/black_hole_test.go @@ -22,9 +22,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" "google.golang.org/grpc" ) diff --git a/tests/integration/clientv3/cluster_test.go b/tests/integration/clientv3/cluster_test.go index 979681be3..fe6cb7c96 100644 --- a/tests/integration/clientv3/cluster_test.go +++ b/tests/integration/clientv3/cluster_test.go @@ -22,9 +22,9 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/tests/v3/integration" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/types" ) func TestMemberList(t *testing.T) { diff --git a/tests/integration/clientv3/concurrency/main_test.go b/tests/integration/clientv3/concurrency/main_test.go index f714c0f37..d149d872f 100644 --- a/tests/integration/clientv3/concurrency/main_test.go +++ b/tests/integration/clientv3/concurrency/main_test.go @@ -18,8 +18,8 @@ import ( "os" "testing" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" - "go.etcd.io/etcd/v3/pkg/testutil" ) var lazyCluster = integration.NewLazyCluster() diff --git a/tests/integration/clientv3/dial_test.go b/tests/integration/clientv3/dial_test.go index 1e1c4848c..dd63442d5 100644 --- a/tests/integration/clientv3/dial_test.go +++ b/tests/integration/clientv3/dial_test.go @@ -22,10 +22,10 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/transport" "google.golang.org/grpc" ) diff --git a/tests/integration/clientv3/examples/example_test.go b/tests/integration/clientv3/examples/example_test.go index bac3092cc..41831c7fc 100644 --- a/tests/integration/clientv3/examples/example_test.go +++ b/tests/integration/clientv3/examples/example_test.go @@ -16,8 +16,8 @@ package clientv3_test import ( "context" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/transport" "log" ) diff --git a/tests/integration/clientv3/examples/main_test.go b/tests/integration/clientv3/examples/main_test.go index 90f36b264..31101209c 100644 --- a/tests/integration/clientv3/examples/main_test.go +++ b/tests/integration/clientv3/examples/main_test.go @@ -19,8 +19,8 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" - "go.etcd.io/etcd/v3/pkg/testutil" ) const ( diff --git a/tests/integration/clientv3/grpc_test.go b/tests/integration/clientv3/grpc_test.go index a85c1657c..b5ca13b3d 100644 --- a/tests/integration/clientv3/grpc_test.go +++ b/tests/integration/clientv3/grpc_test.go @@ -20,10 +20,10 @@ import ( "reflect" "testing" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" etcd "go.etcd.io/etcd/v3/clientv3" namingv3 "go.etcd.io/etcd/v3/clientv3/naming" - "go.etcd.io/etcd/v3/pkg/testutil" "google.golang.org/grpc/naming" ) diff --git a/tests/integration/clientv3/kv_test.go b/tests/integration/clientv3/kv_test.go index 69ac4275e..34a560644 100644 --- a/tests/integration/clientv3/kv_test.go +++ b/tests/integration/clientv3/kv_test.go @@ -28,9 +28,9 @@ import ( "go.etcd.io/etcd/api/v3/mvccpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/tests/integration/clientv3/lease_test.go b/tests/integration/clientv3/lease_test.go index e2862b2b1..411935a17 100644 --- a/tests/integration/clientv3/lease_test.go +++ b/tests/integration/clientv3/lease_test.go @@ -24,10 +24,10 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/concurrency" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestLeaseNotFoundError(t *testing.T) { diff --git a/tests/integration/clientv3/leasing_test.go b/tests/integration/clientv3/leasing_test.go index 65c385e62..c75083b47 100644 --- a/tests/integration/clientv3/leasing_test.go +++ b/tests/integration/clientv3/leasing_test.go @@ -23,11 +23,11 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/concurrency" "go.etcd.io/etcd/v3/clientv3/leasing" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestLeasingPutGet(t *testing.T) { diff --git a/tests/integration/clientv3/main_test.go b/tests/integration/clientv3/main_test.go index b04e0eda9..b30e72001 100644 --- a/tests/integration/clientv3/main_test.go +++ b/tests/integration/clientv3/main_test.go @@ -7,7 +7,7 @@ package clientv3test import ( "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestMain(m *testing.M) { diff --git a/tests/integration/clientv3/maintenance_test.go b/tests/integration/clientv3/maintenance_test.go index 2d8d50fa3..bc19f9cc3 100644 --- a/tests/integration/clientv3/maintenance_test.go +++ b/tests/integration/clientv3/maintenance_test.go @@ -29,12 +29,12 @@ import ( "google.golang.org/grpc" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/lease" "go.etcd.io/etcd/v3/mvcc" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestMaintenanceHashKV(t *testing.T) { diff --git a/tests/integration/clientv3/metrics_test.go b/tests/integration/clientv3/metrics_test.go index 71842cde4..c89f03af7 100644 --- a/tests/integration/clientv3/metrics_test.go +++ b/tests/integration/clientv3/metrics_test.go @@ -25,10 +25,10 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/transport" grpcprom "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/tests/integration/clientv3/mirror_test.go b/tests/integration/clientv3/mirror_test.go index 2a4ac99d7..782c02be0 100644 --- a/tests/integration/clientv3/mirror_test.go +++ b/tests/integration/clientv3/mirror_test.go @@ -23,9 +23,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3/mirror" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestMirrorSync(t *testing.T) { diff --git a/tests/integration/clientv3/namespace_test.go b/tests/integration/clientv3/namespace_test.go index 7caf29bec..c1af9e131 100644 --- a/tests/integration/clientv3/namespace_test.go +++ b/tests/integration/clientv3/namespace_test.go @@ -20,10 +20,10 @@ import ( "testing" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/namespace" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestNamespacePutGet(t *testing.T) { diff --git a/tests/integration/clientv3/network_partition_test.go b/tests/integration/clientv3/network_partition_test.go index a49b20f70..129057161 100644 --- a/tests/integration/clientv3/network_partition_test.go +++ b/tests/integration/clientv3/network_partition_test.go @@ -24,9 +24,9 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" "google.golang.org/grpc" ) diff --git a/tests/integration/clientv3/ordering_kv_test.go b/tests/integration/clientv3/ordering_kv_test.go index 70cc6faaa..8c8251826 100644 --- a/tests/integration/clientv3/ordering_kv_test.go +++ b/tests/integration/clientv3/ordering_kv_test.go @@ -20,10 +20,10 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/ordering" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestDetectKvOrderViolation(t *testing.T) { diff --git a/tests/integration/clientv3/ordering_util_test.go b/tests/integration/clientv3/ordering_util_test.go index 766e4d47b..780ecacad 100644 --- a/tests/integration/clientv3/ordering_util_test.go +++ b/tests/integration/clientv3/ordering_util_test.go @@ -19,10 +19,10 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/ordering" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestEndpointSwitchResolvesViolation(t *testing.T) { diff --git a/tests/integration/clientv3/role_test.go b/tests/integration/clientv3/role_test.go index 5e6c3ae8a..779aef761 100644 --- a/tests/integration/clientv3/role_test.go +++ b/tests/integration/clientv3/role_test.go @@ -19,8 +19,8 @@ import ( "testing" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestRoleError(t *testing.T) { diff --git a/tests/integration/clientv3/server_shutdown_test.go b/tests/integration/clientv3/server_shutdown_test.go index ea5fde641..a3e7ceac4 100644 --- a/tests/integration/clientv3/server_shutdown_test.go +++ b/tests/integration/clientv3/server_shutdown_test.go @@ -22,9 +22,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/tests/integration/clientv3/snapshot/v3_snapshot_test.go b/tests/integration/clientv3/snapshot/v3_snapshot_test.go index 8429cf89c..8f8382615 100644 --- a/tests/integration/clientv3/snapshot/v3_snapshot_test.go +++ b/tests/integration/clientv3/snapshot/v3_snapshot_test.go @@ -24,11 +24,11 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/snapshot" "go.etcd.io/etcd/v3/embed" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/testutil" "go.uber.org/zap" ) diff --git a/tests/integration/clientv3/txn_test.go b/tests/integration/clientv3/txn_test.go index 0f4d145f5..9d32c62ba 100644 --- a/tests/integration/clientv3/txn_test.go +++ b/tests/integration/clientv3/txn_test.go @@ -21,10 +21,10 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/embed" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestTxnError(t *testing.T) { diff --git a/tests/integration/clientv3/user_test.go b/tests/integration/clientv3/user_test.go index 0acd3c516..12910e90e 100644 --- a/tests/integration/clientv3/user_test.go +++ b/tests/integration/clientv3/user_test.go @@ -20,9 +20,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" "google.golang.org/grpc" ) diff --git a/tests/integration/clientv3/watch_fragment_test.go b/tests/integration/clientv3/watch_fragment_test.go index 90b4a9f54..8804ce00d 100644 --- a/tests/integration/clientv3/watch_fragment_test.go +++ b/tests/integration/clientv3/watch_fragment_test.go @@ -23,9 +23,9 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" ) // TestWatchFragmentDisable ensures that large watch diff --git a/tests/integration/clientv3/watch_test.go b/tests/integration/clientv3/watch_test.go index ce6cd8b9b..30e4a590f 100644 --- a/tests/integration/clientv3/watch_test.go +++ b/tests/integration/clientv3/watch_test.go @@ -27,10 +27,10 @@ import ( mvccpb "go.etcd.io/etcd/api/v3/mvccpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/etcdserver/api/v3rpc" - "go.etcd.io/etcd/v3/pkg/testutil" "google.golang.org/grpc/metadata" ) diff --git a/tests/integration/cluster.go b/tests/integration/cluster.go index 8910a6cf7..b9ce2eced 100644 --- a/tests/integration/cluster.go +++ b/tests/integration/cluster.go @@ -34,6 +34,11 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/logutil" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/tlsutil" + "go.etcd.io/etcd/pkg/v3/transport" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/client" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/embed" @@ -47,11 +52,6 @@ import ( "go.etcd.io/etcd/v3/etcdserver/api/v3lock" lockpb "go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb" "go.etcd.io/etcd/v3/etcdserver/api/v3rpc" - "go.etcd.io/etcd/v3/pkg/logutil" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/tlsutil" - "go.etcd.io/etcd/v3/pkg/transport" - "go.etcd.io/etcd/v3/pkg/types" "github.com/soheilhy/cmux" "go.uber.org/zap" diff --git a/tests/integration/cluster_test.go b/tests/integration/cluster_test.go index c305d6faa..8498d75ff 100644 --- a/tests/integration/cluster_test.go +++ b/tests/integration/cluster_test.go @@ -25,9 +25,9 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/client" "go.etcd.io/etcd/v3/etcdserver" - "go.etcd.io/etcd/v3/pkg/testutil" ) func init() { diff --git a/tests/integration/embed/embed_test.go b/tests/integration/embed/embed_test.go index c79ab1ef7..8c6a3887a 100644 --- a/tests/integration/embed/embed_test.go +++ b/tests/integration/embed/embed_test.go @@ -29,10 +29,10 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/embed" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/transport" ) var ( diff --git a/tests/integration/lazy_cluster.go b/tests/integration/lazy_cluster.go index 8d7384cb7..0a92692e7 100644 --- a/tests/integration/lazy_cluster.go +++ b/tests/integration/lazy_cluster.go @@ -20,7 +20,7 @@ import ( "sync" "time" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/transport" ) // Infrastructure to provision a single shared cluster for tests - only diff --git a/tests/integration/main_test.go b/tests/integration/main_test.go index 0e2151345..a4c8fd237 100644 --- a/tests/integration/main_test.go +++ b/tests/integration/main_test.go @@ -7,7 +7,7 @@ package integration import ( "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestMain(m *testing.M) { diff --git a/tests/integration/member_test.go b/tests/integration/member_test.go index dbffedb4a..48c3e4dd8 100644 --- a/tests/integration/member_test.go +++ b/tests/integration/member_test.go @@ -22,8 +22,8 @@ import ( "reflect" "testing" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/client" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestPauseMember(t *testing.T) { diff --git a/tests/integration/metrics_test.go b/tests/integration/metrics_test.go index 8e429b837..23a230bf9 100644 --- a/tests/integration/metrics_test.go +++ b/tests/integration/metrics_test.go @@ -23,9 +23,9 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/v3/etcdserver" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/transport" ) // TestMetricDbSizeBoot checks that the db size metric is set on boot. diff --git a/tests/integration/network_partition_test.go b/tests/integration/network_partition_test.go index b9786c60a..2210f9740 100644 --- a/tests/integration/network_partition_test.go +++ b/tests/integration/network_partition_test.go @@ -19,7 +19,7 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestNetworkPartition5MembersLeaderInMinority(t *testing.T) { diff --git a/tests/integration/proxy/grpcproxy/cluster_test.go b/tests/integration/proxy/grpcproxy/cluster_test.go index e8059949f..c6311152b 100644 --- a/tests/integration/proxy/grpcproxy/cluster_test.go +++ b/tests/integration/proxy/grpcproxy/cluster_test.go @@ -21,9 +21,9 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" "go.etcd.io/etcd/v3/proxy/grpcproxy" "go.uber.org/zap" diff --git a/tests/integration/proxy/grpcproxy/kv_test.go b/tests/integration/proxy/grpcproxy/kv_test.go index eaf87371a..50d8943a2 100644 --- a/tests/integration/proxy/grpcproxy/kv_test.go +++ b/tests/integration/proxy/grpcproxy/kv_test.go @@ -21,9 +21,9 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" "go.etcd.io/etcd/v3/proxy/grpcproxy" "google.golang.org/grpc" diff --git a/tests/integration/proxy/grpcproxy/register_test.go b/tests/integration/proxy/grpcproxy/register_test.go index 2fce4cf04..fe76d0585 100644 --- a/tests/integration/proxy/grpcproxy/register_test.go +++ b/tests/integration/proxy/grpcproxy/register_test.go @@ -18,10 +18,10 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/naming" - "go.etcd.io/etcd/v3/pkg/testutil" "go.etcd.io/etcd/v3/proxy/grpcproxy" "go.uber.org/zap" diff --git a/tests/integration/snapshot/member_test.go b/tests/integration/snapshot/member_test.go index 40e2c997a..e2c609ad5 100644 --- a/tests/integration/snapshot/member_test.go +++ b/tests/integration/snapshot/member_test.go @@ -22,10 +22,10 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/embed" "go.etcd.io/etcd/v3/etcdserver" - "go.etcd.io/etcd/v3/pkg/testutil" ) // TestSnapshotV3RestoreMultiMemberAdd ensures that multiple members diff --git a/tests/integration/snapshot/v3_snapshot_test.go b/tests/integration/snapshot/v3_snapshot_test.go index c2310152b..b37bf5dc2 100644 --- a/tests/integration/snapshot/v3_snapshot_test.go +++ b/tests/integration/snapshot/v3_snapshot_test.go @@ -25,10 +25,10 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/embed" "go.etcd.io/etcd/v3/etcdctl/snapshot" - "go.etcd.io/etcd/v3/pkg/testutil" "go.uber.org/zap" ) diff --git a/tests/integration/util_test.go b/tests/integration/util_test.go index 399c25db2..9b70ffbf1 100644 --- a/tests/integration/util_test.go +++ b/tests/integration/util_test.go @@ -19,7 +19,7 @@ import ( "os" "path/filepath" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/transport" ) // copyTLSFiles clones certs files to dst directory. diff --git a/tests/integration/v2_http_kv_test.go b/tests/integration/v2_http_kv_test.go index daaac25db..76d523ea4 100644 --- a/tests/integration/v2_http_kv_test.go +++ b/tests/integration/v2_http_kv_test.go @@ -26,8 +26,8 @@ import ( "testing" "time" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/transport" ) func TestV2Set(t *testing.T) { diff --git a/tests/integration/v2store/main_test.go b/tests/integration/v2store/main_test.go index 654254928..a11f6c32b 100644 --- a/tests/integration/v2store/main_test.go +++ b/tests/integration/v2store/main_test.go @@ -20,8 +20,8 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/tests/v3/integration" - "go.etcd.io/etcd/v3/pkg/testutil" ) var endpoints []string diff --git a/tests/integration/v2store/store_tag_not_v2v3_test.go b/tests/integration/v2store/store_tag_not_v2v3_test.go index e165094db..5e7550c45 100644 --- a/tests/integration/v2store/store_tag_not_v2v3_test.go +++ b/tests/integration/v2store/store_tag_not_v2v3_test.go @@ -19,8 +19,8 @@ package v2store_test import ( "testing" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/etcdserver/api/v2store" - "go.etcd.io/etcd/v3/pkg/testutil" ) type v2TestStore struct { diff --git a/tests/integration/v2store/store_test.go b/tests/integration/v2store/store_test.go index dba010be4..6e20a85a6 100644 --- a/tests/integration/v2store/store_test.go +++ b/tests/integration/v2store/store_test.go @@ -19,9 +19,9 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/etcdserver/api/v2error" "go.etcd.io/etcd/v3/etcdserver/api/v2store" - "go.etcd.io/etcd/v3/pkg/testutil" ) type StoreCloser interface { diff --git a/tests/integration/v3_alarm_test.go b/tests/integration/v3_alarm_test.go index 57aa07ba1..05ef22c18 100644 --- a/tests/integration/v3_alarm_test.go +++ b/tests/integration/v3_alarm_test.go @@ -24,11 +24,11 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/etcdserver/cindex" "go.etcd.io/etcd/v3/mvcc" "go.etcd.io/etcd/v3/mvcc/backend" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/traceutil" "go.uber.org/zap" ) diff --git a/tests/integration/v3_auth_test.go b/tests/integration/v3_auth_test.go index f928be48e..39103b653 100644 --- a/tests/integration/v3_auth_test.go +++ b/tests/integration/v3_auth_test.go @@ -24,8 +24,8 @@ import ( "go.etcd.io/etcd/api/v3/authpb" pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" ) // TestV3AuthEmptyUserGet ensures that a get with an empty user will return an empty user error. diff --git a/tests/integration/v3_barrier_test.go b/tests/integration/v3_barrier_test.go index a85a2f997..c209cdae7 100644 --- a/tests/integration/v3_barrier_test.go +++ b/tests/integration/v3_barrier_test.go @@ -18,9 +18,9 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/clientv3" recipe "go.etcd.io/etcd/v3/contrib/recipes" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestBarrierSingleNode(t *testing.T) { diff --git a/tests/integration/v3_grpc_inflight_test.go b/tests/integration/v3_grpc_inflight_test.go index 8745cd540..f24d77494 100644 --- a/tests/integration/v3_grpc_inflight_test.go +++ b/tests/integration/v3_grpc_inflight_test.go @@ -22,7 +22,7 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/tests/integration/v3_grpc_test.go b/tests/integration/v3_grpc_test.go index 2191a5d17..c42ba8b89 100644 --- a/tests/integration/v3_grpc_test.go +++ b/tests/integration/v3_grpc_test.go @@ -27,9 +27,9 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/pkg/v3/testutil" + "go.etcd.io/etcd/pkg/v3/transport" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" - "go.etcd.io/etcd/v3/pkg/transport" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/tests/integration/v3_health_test.go b/tests/integration/v3_health_test.go index 6ec98b9d4..1f852d801 100644 --- a/tests/integration/v3_health_test.go +++ b/tests/integration/v3_health_test.go @@ -18,7 +18,7 @@ import ( "context" "testing" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" healthpb "google.golang.org/grpc/health/grpc_health_v1" ) diff --git a/tests/integration/v3_kv_test.go b/tests/integration/v3_kv_test.go index 6e6683b03..f989e84f4 100644 --- a/tests/integration/v3_kv_test.go +++ b/tests/integration/v3_kv_test.go @@ -2,11 +2,11 @@ package integration import ( "context" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/namespace" "go.etcd.io/etcd/v3/embed" "go.etcd.io/etcd/v3/etcdserver/api/v3client" - "go.etcd.io/etcd/v3/pkg/testutil" "io/ioutil" "os" "testing" diff --git a/tests/integration/v3_leadership_test.go b/tests/integration/v3_leadership_test.go index ec79e2552..8e8f2f137 100644 --- a/tests/integration/v3_leadership_test.go +++ b/tests/integration/v3_leadership_test.go @@ -22,7 +22,7 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" ) func TestMoveLeader(t *testing.T) { testMoveLeader(t, true) } diff --git a/tests/integration/v3_lease_test.go b/tests/integration/v3_lease_test.go index 6a4c9c7d2..66f2a21e4 100644 --- a/tests/integration/v3_lease_test.go +++ b/tests/integration/v3_lease_test.go @@ -23,7 +23,7 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/mvccpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/v3/pkg/testutil" + "go.etcd.io/etcd/pkg/v3/testutil" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/tests/integration/v3_lock_test.go b/tests/integration/v3_lock_test.go index bb85ccaab..89614332c 100644 --- a/tests/integration/v3_lock_test.go +++ b/tests/integration/v3_lock_test.go @@ -22,10 +22,10 @@ import ( "time" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/concurrency" recipe "go.etcd.io/etcd/v3/contrib/recipes" - "go.etcd.io/etcd/v3/pkg/testutil" ) func TestMutexLockSingleNode(t *testing.T) { diff --git a/tests/integration/v3_stm_test.go b/tests/integration/v3_stm_test.go index 94d7f2e6f..0d6a21a1c 100644 --- a/tests/integration/v3_stm_test.go +++ b/tests/integration/v3_stm_test.go @@ -21,9 +21,9 @@ import ( "strconv" "testing" + "go.etcd.io/etcd/pkg/v3/testutil" v3 "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/clientv3/concurrency" - "go.etcd.io/etcd/v3/pkg/testutil" ) // TestSTMConflict tests that conflicts are retried. diff --git a/tests/integration/v3_tls_test.go b/tests/integration/v3_tls_test.go index 2c78eaddf..0c22f0425 100644 --- a/tests/integration/v3_tls_test.go +++ b/tests/integration/v3_tls_test.go @@ -20,8 +20,8 @@ import ( "testing" "time" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/testutil" "google.golang.org/grpc" ) diff --git a/tests/integration/v3_watch_test.go b/tests/integration/v3_watch_test.go index 444b79d47..de90f9faa 100644 --- a/tests/integration/v3_watch_test.go +++ b/tests/integration/v3_watch_test.go @@ -26,8 +26,8 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/mvccpb" + "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/etcdserver/api/v3rpc" - "go.etcd.io/etcd/v3/pkg/testutil" ) // TestV3WatchFromCurrentRevision tests Watch APIs from current revision. diff --git a/tests/integration/v3election_grpc_test.go b/tests/integration/v3election_grpc_test.go index 60ede52e5..3f3a8b02e 100644 --- a/tests/integration/v3election_grpc_test.go +++ b/tests/integration/v3election_grpc_test.go @@ -21,8 +21,8 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/testutil" epb "go.etcd.io/etcd/v3/etcdserver/api/v3election/v3electionpb" - "go.etcd.io/etcd/v3/pkg/testutil" ) // TestV3ElectionCampaign checks that Campaign will not give diff --git a/tests/integration/v3lock_grpc_test.go b/tests/integration/v3lock_grpc_test.go index d4c6b03af..10ca2e4ce 100644 --- a/tests/integration/v3lock_grpc_test.go +++ b/tests/integration/v3lock_grpc_test.go @@ -20,8 +20,8 @@ import ( "time" pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/testutil" lockpb "go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb" - "go.etcd.io/etcd/v3/pkg/testutil" ) // TestV3LockLockWaiter tests that a client will wait for a lock, then acquire it diff --git a/tools/benchmark/cmd/lease.go b/tools/benchmark/cmd/lease.go index c8ed1e43b..5350b08bb 100644 --- a/tools/benchmark/cmd/lease.go +++ b/tools/benchmark/cmd/lease.go @@ -19,8 +19,8 @@ import ( "fmt" "time" + "go.etcd.io/etcd/pkg/v3/report" v3 "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/report" "github.com/spf13/cobra" "gopkg.in/cheggaaa/pb.v1" diff --git a/tools/benchmark/cmd/mvcc-put.go b/tools/benchmark/cmd/mvcc-put.go index 3a94191f1..8f9d075f9 100644 --- a/tools/benchmark/cmd/mvcc-put.go +++ b/tools/benchmark/cmd/mvcc-put.go @@ -21,9 +21,9 @@ import ( "runtime/pprof" "time" + "go.etcd.io/etcd/pkg/v3/report" + "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/v3/lease" - "go.etcd.io/etcd/v3/pkg/report" - "go.etcd.io/etcd/v3/pkg/traceutil" "github.com/spf13/cobra" ) diff --git a/tools/benchmark/cmd/put.go b/tools/benchmark/cmd/put.go index cc3b25c94..1b0f1447f 100644 --- a/tools/benchmark/cmd/put.go +++ b/tools/benchmark/cmd/put.go @@ -24,8 +24,8 @@ import ( "strings" "time" + "go.etcd.io/etcd/pkg/v3/report" v3 "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/report" "github.com/dustin/go-humanize" "github.com/spf13/cobra" diff --git a/tools/benchmark/cmd/range.go b/tools/benchmark/cmd/range.go index c46b90d5a..b8279bb80 100644 --- a/tools/benchmark/cmd/range.go +++ b/tools/benchmark/cmd/range.go @@ -21,8 +21,8 @@ import ( "os" "time" + "go.etcd.io/etcd/pkg/v3/report" v3 "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/report" "github.com/spf13/cobra" "golang.org/x/time/rate" diff --git a/tools/benchmark/cmd/root.go b/tools/benchmark/cmd/root.go index 7ee50aad8..e1051dd25 100644 --- a/tools/benchmark/cmd/root.go +++ b/tools/benchmark/cmd/root.go @@ -18,7 +18,7 @@ import ( "sync" "time" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/transport" "github.com/spf13/cobra" "gopkg.in/cheggaaa/pb.v1" diff --git a/tools/benchmark/cmd/stm.go b/tools/benchmark/cmd/stm.go index 0372d628b..6ebb80984 100644 --- a/tools/benchmark/cmd/stm.go +++ b/tools/benchmark/cmd/stm.go @@ -23,10 +23,10 @@ import ( "os" "time" + "go.etcd.io/etcd/pkg/v3/report" v3 "go.etcd.io/etcd/v3/clientv3" v3sync "go.etcd.io/etcd/v3/clientv3/concurrency" "go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb" - "go.etcd.io/etcd/v3/pkg/report" "github.com/spf13/cobra" "golang.org/x/time/rate" diff --git a/tools/benchmark/cmd/txn_put.go b/tools/benchmark/cmd/txn_put.go index a298a4c0a..33a95026b 100644 --- a/tools/benchmark/cmd/txn_put.go +++ b/tools/benchmark/cmd/txn_put.go @@ -22,8 +22,8 @@ import ( "os" "time" + "go.etcd.io/etcd/pkg/v3/report" v3 "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/report" "github.com/spf13/cobra" "golang.org/x/time/rate" diff --git a/tools/benchmark/cmd/util.go b/tools/benchmark/cmd/util.go index 8d4783bdd..45bf017ca 100644 --- a/tools/benchmark/cmd/util.go +++ b/tools/benchmark/cmd/util.go @@ -22,8 +22,8 @@ import ( "strings" "github.com/bgentry/speakeasy" + "go.etcd.io/etcd/pkg/v3/report" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/report" "google.golang.org/grpc/grpclog" ) diff --git a/tools/benchmark/cmd/watch.go b/tools/benchmark/cmd/watch.go index 9cea4884c..e7570b542 100644 --- a/tools/benchmark/cmd/watch.go +++ b/tools/benchmark/cmd/watch.go @@ -23,8 +23,8 @@ import ( "sync/atomic" "time" + "go.etcd.io/etcd/pkg/v3/report" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/report" "github.com/spf13/cobra" "golang.org/x/time/rate" diff --git a/tools/benchmark/cmd/watch_get.go b/tools/benchmark/cmd/watch_get.go index 3cc20fe74..3b42c37fe 100644 --- a/tools/benchmark/cmd/watch_get.go +++ b/tools/benchmark/cmd/watch_get.go @@ -20,8 +20,8 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/report" v3 "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/report" "github.com/spf13/cobra" "gopkg.in/cheggaaa/pb.v1" diff --git a/tools/benchmark/cmd/watch_latency.go b/tools/benchmark/cmd/watch_latency.go index 9025f98fb..0593f9849 100644 --- a/tools/benchmark/cmd/watch_latency.go +++ b/tools/benchmark/cmd/watch_latency.go @@ -21,8 +21,8 @@ import ( "sync" "time" + "go.etcd.io/etcd/pkg/v3/report" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/pkg/report" "github.com/spf13/cobra" "golang.org/x/time/rate" diff --git a/tools/etcd-dump-logs/etcd-dump-log_test.go b/tools/etcd-dump-logs/etcd-dump-log_test.go index 99ebd4213..e85539b06 100644 --- a/tools/etcd-dump-logs/etcd-dump-log_test.go +++ b/tools/etcd-dump-logs/etcd-dump-log_test.go @@ -26,8 +26,8 @@ import ( "go.etcd.io/etcd/api/v3/authpb" "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/pbutil" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal" "go.uber.org/zap" diff --git a/tools/etcd-dump-logs/main.go b/tools/etcd-dump-logs/main.go index a75382439..61fe3f192 100644 --- a/tools/etcd-dump-logs/main.go +++ b/tools/etcd-dump-logs/main.go @@ -29,9 +29,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/pkg/v3/pbutil" + "go.etcd.io/etcd/pkg/v3/types" "go.etcd.io/etcd/v3/etcdserver/api/snap" - "go.etcd.io/etcd/v3/pkg/pbutil" - "go.etcd.io/etcd/v3/pkg/types" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal" "go.etcd.io/etcd/v3/wal/walpb" diff --git a/tools/etcd-dump-metrics/install_darwin.go b/tools/etcd-dump-metrics/install_darwin.go index dab338676..28327c2ec 100644 --- a/tools/etcd-dump-metrics/install_darwin.go +++ b/tools/etcd-dump-metrics/install_darwin.go @@ -24,7 +24,7 @@ import ( "os/exec" "path/filepath" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/fileutil" ) const downloadURL = `https://storage.googleapis.com/etcd/%s/etcd-%s-darwin-amd64.zip` diff --git a/tools/etcd-dump-metrics/install_linux.go b/tools/etcd-dump-metrics/install_linux.go index 68adcaaea..6e064c425 100644 --- a/tools/etcd-dump-metrics/install_linux.go +++ b/tools/etcd-dump-metrics/install_linux.go @@ -23,7 +23,7 @@ import ( "os/exec" "path/filepath" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/fileutil" ) const downloadURL = `https://storage.googleapis.com/etcd/%s/etcd-%s-linux-amd64.tar.gz` diff --git a/tools/etcd-dump-metrics/metrics.go b/tools/etcd-dump-metrics/metrics.go index dfc66622a..1f91679b5 100644 --- a/tools/etcd-dump-metrics/metrics.go +++ b/tools/etcd-dump-metrics/metrics.go @@ -22,7 +22,7 @@ import ( "strings" "time" - "go.etcd.io/etcd/v3/pkg/transport" + "go.etcd.io/etcd/pkg/v3/transport" "go.uber.org/zap" ) diff --git a/wal/decoder.go b/wal/decoder.go index 47794c30a..afc8e00eb 100644 --- a/wal/decoder.go +++ b/wal/decoder.go @@ -21,8 +21,8 @@ import ( "io" "sync" - "go.etcd.io/etcd/v3/pkg/crc" - "go.etcd.io/etcd/v3/pkg/pbutil" + "go.etcd.io/etcd/pkg/v3/crc" + "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal/walpb" ) diff --git a/wal/encoder.go b/wal/encoder.go index b3530eb92..7d6bd5f8a 100644 --- a/wal/encoder.go +++ b/wal/encoder.go @@ -21,8 +21,8 @@ import ( "os" "sync" - "go.etcd.io/etcd/v3/pkg/crc" - "go.etcd.io/etcd/v3/pkg/ioutil" + "go.etcd.io/etcd/pkg/v3/crc" + "go.etcd.io/etcd/pkg/v3/ioutil" "go.etcd.io/etcd/v3/wal/walpb" ) diff --git a/wal/file_pipeline.go b/wal/file_pipeline.go index 18eb80ea0..e5f4624b1 100644 --- a/wal/file_pipeline.go +++ b/wal/file_pipeline.go @@ -19,7 +19,7 @@ import ( "os" "path/filepath" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/fileutil" "go.uber.org/zap" ) diff --git a/wal/repair.go b/wal/repair.go index e15a68dba..863a71a3b 100644 --- a/wal/repair.go +++ b/wal/repair.go @@ -20,7 +20,7 @@ import ( "path/filepath" "time" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/fileutil" "go.etcd.io/etcd/v3/wal/walpb" "go.uber.org/zap" ) diff --git a/wal/util.go b/wal/util.go index e48fe8434..7db5dd555 100644 --- a/wal/util.go +++ b/wal/util.go @@ -19,7 +19,7 @@ import ( "fmt" "strings" - "go.etcd.io/etcd/v3/pkg/fileutil" + "go.etcd.io/etcd/pkg/v3/fileutil" "go.uber.org/zap" ) diff --git a/wal/wal.go b/wal/wal.go index 9f847f378..ced070572 100644 --- a/wal/wal.go +++ b/wal/wal.go @@ -26,8 +26,8 @@ import ( "sync" "time" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/pbutil" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/v3/raft" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal/walpb" diff --git a/wal/wal_test.go b/wal/wal_test.go index 5aa085f0c..525473cfc 100644 --- a/wal/wal_test.go +++ b/wal/wal_test.go @@ -27,8 +27,8 @@ import ( "regexp" "testing" - "go.etcd.io/etcd/v3/pkg/fileutil" - "go.etcd.io/etcd/v3/pkg/pbutil" + "go.etcd.io/etcd/pkg/v3/fileutil" + "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/v3/raft/raftpb" "go.etcd.io/etcd/v3/wal/walpb"