diff --git a/contrib/raftexample/raft.go b/contrib/raftexample/raft.go index 83ced9e00..ff08d556a 100644 --- a/contrib/raftexample/raft.go +++ b/contrib/raftexample/raft.go @@ -24,13 +24,13 @@ import ( "strconv" "time" + "github.com/coreos/etcd/etcdserver/api/rafthttp" "github.com/coreos/etcd/etcdserver/api/snap" stats "github.com/coreos/etcd/etcdserver/api/v2stats" "github.com/coreos/etcd/pkg/fileutil" "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft" "github.com/coreos/etcd/raft/raftpb" - "github.com/coreos/etcd/rafthttp" "github.com/coreos/etcd/wal" "github.com/coreos/etcd/wal/walpb" diff --git a/embed/etcd.go b/embed/etcd.go index 1626a2155..d10224331 100644 --- a/embed/etcd.go +++ b/embed/etcd.go @@ -30,6 +30,7 @@ import ( "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/etcdhttp" + "github.com/coreos/etcd/etcdserver/api/rafthttp" "github.com/coreos/etcd/etcdserver/api/v2http" "github.com/coreos/etcd/etcdserver/api/v2v3" "github.com/coreos/etcd/etcdserver/api/v3client" @@ -38,7 +39,6 @@ import ( runtimeutil "github.com/coreos/etcd/pkg/runtime" "github.com/coreos/etcd/pkg/transport" "github.com/coreos/etcd/pkg/types" - "github.com/coreos/etcd/rafthttp" "github.com/coreos/pkg/capnslog" "github.com/grpc-ecosystem/go-grpc-prometheus" diff --git a/etcdserver/api/etcdhttp/peer.go b/etcdserver/api/etcdhttp/peer.go index 6b533730a..c55f13b99 100644 --- a/etcdserver/api/etcdhttp/peer.go +++ b/etcdserver/api/etcdhttp/peer.go @@ -20,8 +20,8 @@ import ( "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api" + "github.com/coreos/etcd/etcdserver/api/rafthttp" "github.com/coreos/etcd/lease/leasehttp" - "github.com/coreos/etcd/rafthttp" "go.uber.org/zap" ) diff --git a/etcdserver/api/etcdhttp/peer_test.go b/etcdserver/api/etcdhttp/peer_test.go index eb4370168..a3b6feb70 100644 --- a/etcdserver/api/etcdhttp/peer_test.go +++ b/etcdserver/api/etcdhttp/peer_test.go @@ -26,9 +26,9 @@ import ( "go.uber.org/zap" "github.com/coreos/etcd/etcdserver/api/membership" + "github.com/coreos/etcd/etcdserver/api/rafthttp" "github.com/coreos/etcd/pkg/testutil" "github.com/coreos/etcd/pkg/types" - "github.com/coreos/etcd/rafthttp" "github.com/coreos/go-semver/semver" ) diff --git a/rafthttp/coder.go b/etcdserver/api/rafthttp/coder.go similarity index 100% rename from rafthttp/coder.go rename to etcdserver/api/rafthttp/coder.go diff --git a/rafthttp/doc.go b/etcdserver/api/rafthttp/doc.go similarity index 100% rename from rafthttp/doc.go rename to etcdserver/api/rafthttp/doc.go diff --git a/rafthttp/fake_roundtripper_test.go b/etcdserver/api/rafthttp/fake_roundtripper_test.go similarity index 100% rename from rafthttp/fake_roundtripper_test.go rename to etcdserver/api/rafthttp/fake_roundtripper_test.go diff --git a/rafthttp/functional_test.go b/etcdserver/api/rafthttp/functional_test.go similarity index 100% rename from rafthttp/functional_test.go rename to etcdserver/api/rafthttp/functional_test.go diff --git a/rafthttp/http.go b/etcdserver/api/rafthttp/http.go similarity index 100% rename from rafthttp/http.go rename to etcdserver/api/rafthttp/http.go diff --git a/rafthttp/http_test.go b/etcdserver/api/rafthttp/http_test.go similarity index 100% rename from rafthttp/http_test.go rename to etcdserver/api/rafthttp/http_test.go diff --git a/rafthttp/metrics.go b/etcdserver/api/rafthttp/metrics.go similarity index 100% rename from rafthttp/metrics.go rename to etcdserver/api/rafthttp/metrics.go diff --git a/rafthttp/msg_codec.go b/etcdserver/api/rafthttp/msg_codec.go similarity index 100% rename from rafthttp/msg_codec.go rename to etcdserver/api/rafthttp/msg_codec.go diff --git a/rafthttp/msg_codec_test.go b/etcdserver/api/rafthttp/msg_codec_test.go similarity index 100% rename from rafthttp/msg_codec_test.go rename to etcdserver/api/rafthttp/msg_codec_test.go diff --git a/rafthttp/msgappv2_codec.go b/etcdserver/api/rafthttp/msgappv2_codec.go similarity index 100% rename from rafthttp/msgappv2_codec.go rename to etcdserver/api/rafthttp/msgappv2_codec.go diff --git a/rafthttp/msgappv2_codec_test.go b/etcdserver/api/rafthttp/msgappv2_codec_test.go similarity index 100% rename from rafthttp/msgappv2_codec_test.go rename to etcdserver/api/rafthttp/msgappv2_codec_test.go diff --git a/rafthttp/peer.go b/etcdserver/api/rafthttp/peer.go similarity index 100% rename from rafthttp/peer.go rename to etcdserver/api/rafthttp/peer.go diff --git a/rafthttp/peer_status.go b/etcdserver/api/rafthttp/peer_status.go similarity index 100% rename from rafthttp/peer_status.go rename to etcdserver/api/rafthttp/peer_status.go diff --git a/rafthttp/peer_test.go b/etcdserver/api/rafthttp/peer_test.go similarity index 100% rename from rafthttp/peer_test.go rename to etcdserver/api/rafthttp/peer_test.go diff --git a/rafthttp/pipeline.go b/etcdserver/api/rafthttp/pipeline.go similarity index 100% rename from rafthttp/pipeline.go rename to etcdserver/api/rafthttp/pipeline.go diff --git a/rafthttp/pipeline_test.go b/etcdserver/api/rafthttp/pipeline_test.go similarity index 100% rename from rafthttp/pipeline_test.go rename to etcdserver/api/rafthttp/pipeline_test.go diff --git a/rafthttp/probing_status.go b/etcdserver/api/rafthttp/probing_status.go similarity index 100% rename from rafthttp/probing_status.go rename to etcdserver/api/rafthttp/probing_status.go diff --git a/rafthttp/remote.go b/etcdserver/api/rafthttp/remote.go similarity index 100% rename from rafthttp/remote.go rename to etcdserver/api/rafthttp/remote.go diff --git a/rafthttp/snapshot_sender.go b/etcdserver/api/rafthttp/snapshot_sender.go similarity index 100% rename from rafthttp/snapshot_sender.go rename to etcdserver/api/rafthttp/snapshot_sender.go diff --git a/rafthttp/snapshot_test.go b/etcdserver/api/rafthttp/snapshot_test.go similarity index 100% rename from rafthttp/snapshot_test.go rename to etcdserver/api/rafthttp/snapshot_test.go diff --git a/rafthttp/stream.go b/etcdserver/api/rafthttp/stream.go similarity index 100% rename from rafthttp/stream.go rename to etcdserver/api/rafthttp/stream.go diff --git a/rafthttp/stream_test.go b/etcdserver/api/rafthttp/stream_test.go similarity index 100% rename from rafthttp/stream_test.go rename to etcdserver/api/rafthttp/stream_test.go diff --git a/rafthttp/transport.go b/etcdserver/api/rafthttp/transport.go similarity index 100% rename from rafthttp/transport.go rename to etcdserver/api/rafthttp/transport.go diff --git a/rafthttp/transport_bench_test.go b/etcdserver/api/rafthttp/transport_bench_test.go similarity index 100% rename from rafthttp/transport_bench_test.go rename to etcdserver/api/rafthttp/transport_bench_test.go diff --git a/rafthttp/transport_test.go b/etcdserver/api/rafthttp/transport_test.go similarity index 100% rename from rafthttp/transport_test.go rename to etcdserver/api/rafthttp/transport_test.go diff --git a/rafthttp/urlpick.go b/etcdserver/api/rafthttp/urlpick.go similarity index 100% rename from rafthttp/urlpick.go rename to etcdserver/api/rafthttp/urlpick.go diff --git a/rafthttp/urlpick_test.go b/etcdserver/api/rafthttp/urlpick_test.go similarity index 100% rename from rafthttp/urlpick_test.go rename to etcdserver/api/rafthttp/urlpick_test.go diff --git a/rafthttp/util.go b/etcdserver/api/rafthttp/util.go similarity index 100% rename from rafthttp/util.go rename to etcdserver/api/rafthttp/util.go diff --git a/rafthttp/util_test.go b/etcdserver/api/rafthttp/util_test.go similarity index 100% rename from rafthttp/util_test.go rename to etcdserver/api/rafthttp/util_test.go diff --git a/etcdserver/raft.go b/etcdserver/raft.go index c247653f1..b7260e6c5 100644 --- a/etcdserver/raft.go +++ b/etcdserver/raft.go @@ -23,6 +23,7 @@ import ( "time" "github.com/coreos/etcd/etcdserver/api/membership" + "github.com/coreos/etcd/etcdserver/api/rafthttp" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/contention" "github.com/coreos/etcd/pkg/logutil" @@ -30,7 +31,6 @@ import ( "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft" "github.com/coreos/etcd/raft/raftpb" - "github.com/coreos/etcd/rafthttp" "github.com/coreos/etcd/wal" "github.com/coreos/etcd/wal/walpb" diff --git a/etcdserver/server.go b/etcdserver/server.go index 7e46f3a62..169bae72a 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -32,6 +32,7 @@ import ( "github.com/coreos/etcd/auth" "github.com/coreos/etcd/etcdserver/api" "github.com/coreos/etcd/etcdserver/api/membership" + "github.com/coreos/etcd/etcdserver/api/rafthttp" "github.com/coreos/etcd/etcdserver/api/snap" "github.com/coreos/etcd/etcdserver/api/v2discovery" "github.com/coreos/etcd/etcdserver/api/v2http/httptypes" @@ -53,7 +54,6 @@ import ( "github.com/coreos/etcd/pkg/wait" "github.com/coreos/etcd/raft" "github.com/coreos/etcd/raft/raftpb" - "github.com/coreos/etcd/rafthttp" "github.com/coreos/etcd/version" "github.com/coreos/etcd/wal" diff --git a/etcdserver/server_test.go b/etcdserver/server_test.go index c0b36c55d..118053e5b 100644 --- a/etcdserver/server_test.go +++ b/etcdserver/server_test.go @@ -31,6 +31,7 @@ import ( "go.uber.org/zap" "github.com/coreos/etcd/etcdserver/api/membership" + "github.com/coreos/etcd/etcdserver/api/rafthttp" "github.com/coreos/etcd/etcdserver/api/snap" "github.com/coreos/etcd/etcdserver/api/v2store" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" @@ -48,7 +49,6 @@ import ( "github.com/coreos/etcd/pkg/wait" "github.com/coreos/etcd/raft" "github.com/coreos/etcd/raft/raftpb" - "github.com/coreos/etcd/rafthttp" ) // TestDoLocalAction tests requests which do not need to go through raft to be applied, diff --git a/etcdserver/util.go b/etcdserver/util.go index b8077eaf3..3a12a4be4 100644 --- a/etcdserver/util.go +++ b/etcdserver/util.go @@ -19,8 +19,8 @@ import ( "time" "github.com/coreos/etcd/etcdserver/api/membership" + "github.com/coreos/etcd/etcdserver/api/rafthttp" "github.com/coreos/etcd/pkg/types" - "github.com/coreos/etcd/rafthttp" "go.uber.org/zap" ) diff --git a/etcdserver/util_test.go b/etcdserver/util_test.go index 5fdfbe938..c2ea0d7c0 100644 --- a/etcdserver/util_test.go +++ b/etcdserver/util_test.go @@ -22,10 +22,10 @@ import ( "go.uber.org/zap" "github.com/coreos/etcd/etcdserver/api/membership" + "github.com/coreos/etcd/etcdserver/api/rafthttp" "github.com/coreos/etcd/etcdserver/api/snap" "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft/raftpb" - "github.com/coreos/etcd/rafthttp" ) func TestLongestConnected(t *testing.T) { diff --git a/integration/cluster.go b/integration/cluster.go index b32895b96..9944dc8bb 100644 --- a/integration/cluster.go +++ b/integration/cluster.go @@ -38,6 +38,7 @@ import ( "github.com/coreos/etcd/embed" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/etcdhttp" + "github.com/coreos/etcd/etcdserver/api/rafthttp" "github.com/coreos/etcd/etcdserver/api/v2http" "github.com/coreos/etcd/etcdserver/api/v3client" "github.com/coreos/etcd/etcdserver/api/v3election" @@ -50,7 +51,6 @@ import ( "github.com/coreos/etcd/pkg/tlsutil" "github.com/coreos/etcd/pkg/transport" "github.com/coreos/etcd/pkg/types" - "github.com/coreos/etcd/rafthttp" "github.com/soheilhy/cmux" "go.uber.org/zap"