diff --git a/core/bootstrap.go b/core/bootstrap.go index fa46dcf4f..8faeaecaf 100644 --- a/core/bootstrap.go +++ b/core/bootstrap.go @@ -8,7 +8,7 @@ import ( "time" config "github.com/jbenet/go-ipfs/config" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" dht "github.com/jbenet/go-ipfs/routing/dht" lgbl "github.com/jbenet/go-ipfs/util/eventlog/loggables" diff --git a/core/core.go b/core/core.go index 49140b4de..ec7d20fd1 100644 --- a/core/core.go +++ b/core/core.go @@ -19,9 +19,9 @@ import ( mount "github.com/jbenet/go-ipfs/fuse/mount" merkledag "github.com/jbenet/go-ipfs/merkledag" namesys "github.com/jbenet/go-ipfs/namesys" - inet "github.com/jbenet/go-ipfs/net" - swarmnet "github.com/jbenet/go-ipfs/net/swarmnet" ic "github.com/jbenet/go-ipfs/p2p/crypto" + inet "github.com/jbenet/go-ipfs/p2p/net" + swarmnet "github.com/jbenet/go-ipfs/p2p/net/swarmnet" peer "github.com/jbenet/go-ipfs/p2p/peer" path "github.com/jbenet/go-ipfs/path" pin "github.com/jbenet/go-ipfs/pin" diff --git a/core/mock.go b/core/mock.go index 069ea157a..aba5e4b53 100644 --- a/core/mock.go +++ b/core/mock.go @@ -10,8 +10,8 @@ import ( "github.com/jbenet/go-ipfs/exchange/offline" mdag "github.com/jbenet/go-ipfs/merkledag" nsys "github.com/jbenet/go-ipfs/namesys" - "github.com/jbenet/go-ipfs/net/mock" ci "github.com/jbenet/go-ipfs/p2p/crypto" + "github.com/jbenet/go-ipfs/p2p/net/mock" peer "github.com/jbenet/go-ipfs/p2p/peer" path "github.com/jbenet/go-ipfs/path" dht "github.com/jbenet/go-ipfs/routing/dht" diff --git a/diagnostics/diag.go b/diagnostics/diag.go index 3bb0b92f0..de24ab6f5 100644 --- a/diagnostics/diag.go +++ b/diagnostics/diag.go @@ -18,7 +18,7 @@ import ( "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto" pb "github.com/jbenet/go-ipfs/diagnostics/internal/pb" - net "github.com/jbenet/go-ipfs/net" + net "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" util "github.com/jbenet/go-ipfs/util" ) diff --git a/epictest/addcat_test.go b/epictest/addcat_test.go index c9ccb931a..19f5023e3 100644 --- a/epictest/addcat_test.go +++ b/epictest/addcat_test.go @@ -11,7 +11,7 @@ import ( context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" random "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random" - mocknet "github.com/jbenet/go-ipfs/net/mock" + mocknet "github.com/jbenet/go-ipfs/p2p/net/mock" errors "github.com/jbenet/go-ipfs/util/debugerror" ) diff --git a/epictest/core.go b/epictest/core.go index 5937e4889..a46b2e616 100644 --- a/epictest/core.go +++ b/epictest/core.go @@ -15,7 +15,7 @@ import ( importer "github.com/jbenet/go-ipfs/importer" chunk "github.com/jbenet/go-ipfs/importer/chunk" merkledag "github.com/jbenet/go-ipfs/merkledag" - net "github.com/jbenet/go-ipfs/net" + net "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" path "github.com/jbenet/go-ipfs/path" dht "github.com/jbenet/go-ipfs/routing/dht" diff --git a/epictest/three_legged_cat_test.go b/epictest/three_legged_cat_test.go index d66578305..f41b850ca 100644 --- a/epictest/three_legged_cat_test.go +++ b/epictest/three_legged_cat_test.go @@ -7,7 +7,7 @@ import ( "testing" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" - mocknet "github.com/jbenet/go-ipfs/net/mock" + mocknet "github.com/jbenet/go-ipfs/p2p/net/mock" errors "github.com/jbenet/go-ipfs/util/debugerror" ) diff --git a/exchange/bitswap/message/message.go b/exchange/bitswap/message/message.go index 7f7f1d08e..117758d9e 100644 --- a/exchange/bitswap/message/message.go +++ b/exchange/bitswap/message/message.go @@ -6,7 +6,7 @@ import ( blocks "github.com/jbenet/go-ipfs/blocks" pb "github.com/jbenet/go-ipfs/exchange/bitswap/message/internal/pb" wantlist "github.com/jbenet/go-ipfs/exchange/bitswap/wantlist" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" u "github.com/jbenet/go-ipfs/util" ggio "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/gogoprotobuf/io" diff --git a/exchange/bitswap/network/ipfs_impl.go b/exchange/bitswap/network/ipfs_impl.go index 73114642f..7c975acf2 100644 --- a/exchange/bitswap/network/ipfs_impl.go +++ b/exchange/bitswap/network/ipfs_impl.go @@ -3,7 +3,7 @@ package network import ( context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" bsmsg "github.com/jbenet/go-ipfs/exchange/bitswap/message" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" routing "github.com/jbenet/go-ipfs/routing" util "github.com/jbenet/go-ipfs/util" diff --git a/exchange/bitswap/testnet/peernet.go b/exchange/bitswap/testnet/peernet.go index e16242ce0..7caa64efd 100644 --- a/exchange/bitswap/testnet/peernet.go +++ b/exchange/bitswap/testnet/peernet.go @@ -4,7 +4,7 @@ import ( context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore" bsnet "github.com/jbenet/go-ipfs/exchange/bitswap/network" - mockpeernet "github.com/jbenet/go-ipfs/net/mock" + mockpeernet "github.com/jbenet/go-ipfs/p2p/net/mock" peer "github.com/jbenet/go-ipfs/p2p/peer" mockrouting "github.com/jbenet/go-ipfs/routing/mock" testutil "github.com/jbenet/go-ipfs/util/testutil" diff --git a/net/README.md b/p2p/net/README.md similarity index 100% rename from net/README.md rename to p2p/net/README.md diff --git a/net/backpressure/backpressure.go b/p2p/net/backpressure/backpressure.go similarity index 100% rename from net/backpressure/backpressure.go rename to p2p/net/backpressure/backpressure.go diff --git a/net/backpressure/backpressure_test.go b/p2p/net/backpressure/backpressure_test.go similarity index 98% rename from net/backpressure/backpressure_test.go rename to p2p/net/backpressure/backpressure_test.go index 968f1fc68..510f92844 100644 --- a/net/backpressure/backpressure_test.go +++ b/p2p/net/backpressure/backpressure_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - inet "github.com/jbenet/go-ipfs/net" - netutil "github.com/jbenet/go-ipfs/net/swarmnet/util" + inet "github.com/jbenet/go-ipfs/p2p/net" + netutil "github.com/jbenet/go-ipfs/p2p/net/swarmnet/util" peer "github.com/jbenet/go-ipfs/p2p/peer" eventlog "github.com/jbenet/go-ipfs/util/eventlog" diff --git a/net/conn/conn.go b/p2p/net/conn/conn.go similarity index 100% rename from net/conn/conn.go rename to p2p/net/conn/conn.go diff --git a/net/conn/conn_test.go b/p2p/net/conn/conn_test.go similarity index 100% rename from net/conn/conn_test.go rename to p2p/net/conn/conn_test.go diff --git a/net/conn/dial.go b/p2p/net/conn/dial.go similarity index 100% rename from net/conn/dial.go rename to p2p/net/conn/dial.go diff --git a/net/conn/dial_test.go b/p2p/net/conn/dial_test.go similarity index 100% rename from net/conn/dial_test.go rename to p2p/net/conn/dial_test.go diff --git a/net/conn/handshake.go b/p2p/net/conn/handshake.go similarity index 92% rename from net/conn/handshake.go rename to p2p/net/conn/handshake.go index 3a995bc9a..16f45d24c 100644 --- a/net/conn/handshake.go +++ b/p2p/net/conn/handshake.go @@ -3,8 +3,8 @@ package conn import ( "fmt" - handshake "github.com/jbenet/go-ipfs/net/handshake" - hspb "github.com/jbenet/go-ipfs/net/handshake/pb" + handshake "github.com/jbenet/go-ipfs/p2p/net/handshake" + hspb "github.com/jbenet/go-ipfs/p2p/net/handshake/pb" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" ggprotoio "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/gogoprotobuf/io" diff --git a/net/conn/interface.go b/p2p/net/conn/interface.go similarity index 100% rename from net/conn/interface.go rename to p2p/net/conn/interface.go diff --git a/net/conn/listen.go b/p2p/net/conn/listen.go similarity index 100% rename from net/conn/listen.go rename to p2p/net/conn/listen.go diff --git a/net/conn/secure_conn.go b/p2p/net/conn/secure_conn.go similarity index 100% rename from net/conn/secure_conn.go rename to p2p/net/conn/secure_conn.go diff --git a/net/conn/secure_conn_test.go b/p2p/net/conn/secure_conn_test.go similarity index 100% rename from net/conn/secure_conn_test.go rename to p2p/net/conn/secure_conn_test.go diff --git a/net/handshake/README.md b/p2p/net/handshake/README.md similarity index 100% rename from net/handshake/README.md rename to p2p/net/handshake/README.md diff --git a/net/handshake/doc.go b/p2p/net/handshake/doc.go similarity index 100% rename from net/handshake/doc.go rename to p2p/net/handshake/doc.go diff --git a/net/handshake/handshake1.go b/p2p/net/handshake/handshake1.go similarity index 96% rename from net/handshake/handshake1.go rename to p2p/net/handshake/handshake1.go index 17ca44f09..66302e16a 100644 --- a/net/handshake/handshake1.go +++ b/p2p/net/handshake/handshake1.go @@ -5,7 +5,7 @@ import ( "fmt" config "github.com/jbenet/go-ipfs/config" - pb "github.com/jbenet/go-ipfs/net/handshake/pb" + pb "github.com/jbenet/go-ipfs/p2p/net/handshake/pb" u "github.com/jbenet/go-ipfs/util" semver "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/coreos/go-semver/semver" diff --git a/net/handshake/handshake1_test.go b/p2p/net/handshake/handshake1_test.go similarity index 100% rename from net/handshake/handshake1_test.go rename to p2p/net/handshake/handshake1_test.go diff --git a/net/handshake/pb/Makefile b/p2p/net/handshake/pb/Makefile similarity index 100% rename from net/handshake/pb/Makefile rename to p2p/net/handshake/pb/Makefile diff --git a/net/handshake/pb/handshake.pb.go b/p2p/net/handshake/pb/handshake.pb.go similarity index 100% rename from net/handshake/pb/handshake.pb.go rename to p2p/net/handshake/pb/handshake.pb.go diff --git a/net/handshake/pb/handshake.proto b/p2p/net/handshake/pb/handshake.proto similarity index 100% rename from net/handshake/pb/handshake.proto rename to p2p/net/handshake/pb/handshake.proto diff --git a/net/interface.go b/p2p/net/interface.go similarity index 98% rename from net/interface.go rename to p2p/net/interface.go index 29d703bb2..2da7e49b5 100644 --- a/net/interface.go +++ b/p2p/net/interface.go @@ -3,8 +3,8 @@ package net import ( "io" - conn "github.com/jbenet/go-ipfs/net/conn" - // swarm "github.com/jbenet/go-ipfs/net/swarm2" + conn "github.com/jbenet/go-ipfs/p2p/net/conn" + // swarm "github.com/jbenet/go-ipfs/p2p/net/swarm2" peer "github.com/jbenet/go-ipfs/p2p/peer" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" diff --git a/net/mock/interface.go b/p2p/net/mock/interface.go similarity index 98% rename from net/mock/interface.go rename to p2p/net/mock/interface.go index 658ac8c65..a0c0fb4b3 100644 --- a/net/mock/interface.go +++ b/p2p/net/mock/interface.go @@ -10,8 +10,8 @@ import ( "io" "time" - inet "github.com/jbenet/go-ipfs/net" ic "github.com/jbenet/go-ipfs/p2p/crypto" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" diff --git a/net/mock/mock.go b/p2p/net/mock/mock.go similarity index 100% rename from net/mock/mock.go rename to p2p/net/mock/mock.go diff --git a/net/mock/mock_conn.go b/p2p/net/mock/mock_conn.go similarity index 96% rename from net/mock/mock_conn.go rename to p2p/net/mock/mock_conn.go index 549d9e444..5b4d250dd 100644 --- a/net/mock/mock_conn.go +++ b/p2p/net/mock/mock_conn.go @@ -4,9 +4,9 @@ import ( "container/list" "sync" - inet "github.com/jbenet/go-ipfs/net" - mux "github.com/jbenet/go-ipfs/net/services/mux" ic "github.com/jbenet/go-ipfs/p2p/crypto" + inet "github.com/jbenet/go-ipfs/p2p/net" + mux "github.com/jbenet/go-ipfs/p2p/net/services/mux" peer "github.com/jbenet/go-ipfs/p2p/peer" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" diff --git a/net/mock/mock_link.go b/p2p/net/mock/mock_link.go similarity index 97% rename from net/mock/mock_link.go rename to p2p/net/mock/mock_link.go index 0753d96d9..cfd4be142 100644 --- a/net/mock/mock_link.go +++ b/p2p/net/mock/mock_link.go @@ -4,7 +4,7 @@ import ( "io" "sync" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" ) diff --git a/net/mock/mock_net.go b/p2p/net/mock/mock_net.go similarity index 99% rename from net/mock/mock_net.go rename to p2p/net/mock/mock_net.go index 3c8a59634..29520a9d1 100644 --- a/net/mock/mock_net.go +++ b/p2p/net/mock/mock_net.go @@ -4,8 +4,8 @@ import ( "fmt" "sync" - inet "github.com/jbenet/go-ipfs/net" ic "github.com/jbenet/go-ipfs/p2p/crypto" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" testutil "github.com/jbenet/go-ipfs/util/testutil" diff --git a/net/mock/mock_peernet.go b/p2p/net/mock/mock_peernet.go similarity index 97% rename from net/mock/mock_peernet.go rename to p2p/net/mock/mock_peernet.go index 13745d143..b3b7cccb3 100644 --- a/net/mock/mock_peernet.go +++ b/p2p/net/mock/mock_peernet.go @@ -5,11 +5,11 @@ import ( "math/rand" "sync" - inet "github.com/jbenet/go-ipfs/net" - ids "github.com/jbenet/go-ipfs/net/services/identify" - mux "github.com/jbenet/go-ipfs/net/services/mux" - relay "github.com/jbenet/go-ipfs/net/services/relay" ic "github.com/jbenet/go-ipfs/p2p/crypto" + inet "github.com/jbenet/go-ipfs/p2p/net" + ids "github.com/jbenet/go-ipfs/p2p/net/services/identify" + mux "github.com/jbenet/go-ipfs/p2p/net/services/mux" + relay "github.com/jbenet/go-ipfs/p2p/net/services/relay" peer "github.com/jbenet/go-ipfs/p2p/peer" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" diff --git a/net/mock/mock_printer.go b/p2p/net/mock/mock_printer.go similarity index 94% rename from net/mock/mock_printer.go rename to p2p/net/mock/mock_printer.go index df3cbf15d..47b6e8178 100644 --- a/net/mock/mock_printer.go +++ b/p2p/net/mock/mock_printer.go @@ -4,7 +4,7 @@ import ( "fmt" "io" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" ) diff --git a/net/mock/mock_stream.go b/p2p/net/mock/mock_stream.go similarity index 89% rename from net/mock/mock_stream.go rename to p2p/net/mock/mock_stream.go index 9bf3f7d46..71a0ba66d 100644 --- a/net/mock/mock_stream.go +++ b/p2p/net/mock/mock_stream.go @@ -3,7 +3,7 @@ package mocknet import ( "io" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" ) // stream implements inet.Stream diff --git a/net/mock/mock_test.go b/p2p/net/mock/mock_test.go similarity index 99% rename from net/mock/mock_test.go rename to p2p/net/mock/mock_test.go index 3ae01aade..ef61bd1bd 100644 --- a/net/mock/mock_test.go +++ b/p2p/net/mock/mock_test.go @@ -7,7 +7,7 @@ import ( "sync" "testing" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" testutil "github.com/jbenet/go-ipfs/util/testutil" diff --git a/net/services/identify/id.go b/p2p/net/services/identify/id.go similarity index 97% rename from net/services/identify/id.go rename to p2p/net/services/identify/id.go index df624187d..ecdb9b0d8 100644 --- a/net/services/identify/id.go +++ b/p2p/net/services/identify/id.go @@ -6,9 +6,9 @@ import ( ggio "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/gogoprotobuf/io" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" - inet "github.com/jbenet/go-ipfs/net" - handshake "github.com/jbenet/go-ipfs/net/handshake" - pb "github.com/jbenet/go-ipfs/net/handshake/pb" + inet "github.com/jbenet/go-ipfs/p2p/net" + handshake "github.com/jbenet/go-ipfs/p2p/net/handshake" + pb "github.com/jbenet/go-ipfs/p2p/net/handshake/pb" eventlog "github.com/jbenet/go-ipfs/util/eventlog" ) diff --git a/net/services/identify/id_test.go b/p2p/net/services/identify/id_test.go similarity index 95% rename from net/services/identify/id_test.go rename to p2p/net/services/identify/id_test.go index 82f841de3..266257020 100644 --- a/net/services/identify/id_test.go +++ b/p2p/net/services/identify/id_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - inet "github.com/jbenet/go-ipfs/net" - handshake "github.com/jbenet/go-ipfs/net/handshake" - netutil "github.com/jbenet/go-ipfs/net/swarmnet/util" + inet "github.com/jbenet/go-ipfs/p2p/net" + handshake "github.com/jbenet/go-ipfs/p2p/net/handshake" + netutil "github.com/jbenet/go-ipfs/p2p/net/swarmnet/util" peer "github.com/jbenet/go-ipfs/p2p/peer" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" diff --git a/net/services/mux/mux.go b/p2p/net/services/mux/mux.go similarity index 99% rename from net/services/mux/mux.go rename to p2p/net/services/mux/mux.go index 52913a56e..f47340bcc 100644 --- a/net/services/mux/mux.go +++ b/p2p/net/services/mux/mux.go @@ -7,7 +7,7 @@ import ( context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" eventlog "github.com/jbenet/go-ipfs/util/eventlog" lgbl "github.com/jbenet/go-ipfs/util/eventlog/loggables" ) diff --git a/net/services/mux/mux_test.go b/p2p/net/services/mux/mux_test.go similarity index 96% rename from net/services/mux/mux_test.go rename to p2p/net/services/mux/mux_test.go index ac6e54843..642226b34 100644 --- a/net/services/mux/mux_test.go +++ b/p2p/net/services/mux/mux_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" ) var testCases = map[string]string{ diff --git a/net/services/relay/relay.go b/p2p/net/services/relay/relay.go similarity index 98% rename from net/services/relay/relay.go rename to p2p/net/services/relay/relay.go index 21d1f434f..ec7204ba7 100644 --- a/net/services/relay/relay.go +++ b/p2p/net/services/relay/relay.go @@ -8,7 +8,7 @@ import ( ctxgroup "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-ctxgroup" mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" eventlog "github.com/jbenet/go-ipfs/util/eventlog" ) diff --git a/net/services/relay/relay_test.go b/p2p/net/services/relay/relay_test.go similarity index 97% rename from net/services/relay/relay_test.go rename to p2p/net/services/relay/relay_test.go index 01192bfa9..f82e15677 100644 --- a/net/services/relay/relay_test.go +++ b/p2p/net/services/relay/relay_test.go @@ -4,10 +4,10 @@ import ( "io" "testing" - inet "github.com/jbenet/go-ipfs/net" - mux "github.com/jbenet/go-ipfs/net/services/mux" - relay "github.com/jbenet/go-ipfs/net/services/relay" - netutil "github.com/jbenet/go-ipfs/net/swarmnet/util" + inet "github.com/jbenet/go-ipfs/p2p/net" + mux "github.com/jbenet/go-ipfs/p2p/net/services/mux" + relay "github.com/jbenet/go-ipfs/p2p/net/services/relay" + netutil "github.com/jbenet/go-ipfs/p2p/net/swarmnet/util" eventlog "github.com/jbenet/go-ipfs/util/eventlog" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" diff --git a/net/swarm/addr.go b/p2p/net/swarm/addr.go similarity index 98% rename from net/swarm/addr.go rename to p2p/net/swarm/addr.go index 5f074df94..01cb39717 100644 --- a/net/swarm/addr.go +++ b/p2p/net/swarm/addr.go @@ -1,7 +1,7 @@ package swarm import ( - conn "github.com/jbenet/go-ipfs/net/conn" + conn "github.com/jbenet/go-ipfs/p2p/net/conn" eventlog "github.com/jbenet/go-ipfs/util/eventlog" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" diff --git a/net/swarm/simul_test.go b/p2p/net/swarm/simul_test.go similarity index 100% rename from net/swarm/simul_test.go rename to p2p/net/swarm/simul_test.go diff --git a/net/swarm/swarm.go b/p2p/net/swarm/swarm.go similarity index 100% rename from net/swarm/swarm.go rename to p2p/net/swarm/swarm.go diff --git a/net/swarm/swarm_conn.go b/p2p/net/swarm/swarm_conn.go similarity index 98% rename from net/swarm/swarm_conn.go rename to p2p/net/swarm/swarm_conn.go index 3ce6acdd3..f5993e704 100644 --- a/net/swarm/swarm_conn.go +++ b/p2p/net/swarm/swarm_conn.go @@ -3,8 +3,8 @@ package swarm import ( "fmt" - conn "github.com/jbenet/go-ipfs/net/conn" ic "github.com/jbenet/go-ipfs/p2p/crypto" + conn "github.com/jbenet/go-ipfs/p2p/net/conn" peer "github.com/jbenet/go-ipfs/p2p/peer" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" diff --git a/net/swarm/swarm_dial.go b/p2p/net/swarm/swarm_dial.go similarity index 98% rename from net/swarm/swarm_dial.go rename to p2p/net/swarm/swarm_dial.go index 67c94ac76..dde967fbc 100644 --- a/net/swarm/swarm_dial.go +++ b/p2p/net/swarm/swarm_dial.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - conn "github.com/jbenet/go-ipfs/net/conn" + conn "github.com/jbenet/go-ipfs/p2p/net/conn" peer "github.com/jbenet/go-ipfs/p2p/peer" lgbl "github.com/jbenet/go-ipfs/util/eventlog/loggables" diff --git a/net/swarm/swarm_listen.go b/p2p/net/swarm/swarm_listen.go similarity index 98% rename from net/swarm/swarm_listen.go rename to p2p/net/swarm/swarm_listen.go index bcc55cad6..ba0bee2e7 100644 --- a/net/swarm/swarm_listen.go +++ b/p2p/net/swarm/swarm_listen.go @@ -1,7 +1,7 @@ package swarm import ( - conn "github.com/jbenet/go-ipfs/net/conn" + conn "github.com/jbenet/go-ipfs/p2p/net/conn" lgbl "github.com/jbenet/go-ipfs/util/eventlog/loggables" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" diff --git a/net/swarm/swarm_stream.go b/p2p/net/swarm/swarm_stream.go similarity index 100% rename from net/swarm/swarm_stream.go rename to p2p/net/swarm/swarm_stream.go diff --git a/net/swarm/swarm_test.go b/p2p/net/swarm/swarm_test.go similarity index 100% rename from net/swarm/swarm_test.go rename to p2p/net/swarm/swarm_test.go diff --git a/net/swarmnet/net.go b/p2p/net/swarmnet/net.go similarity index 96% rename from net/swarmnet/net.go rename to p2p/net/swarmnet/net.go index 73190dad3..ff5e60ec1 100644 --- a/net/swarmnet/net.go +++ b/p2p/net/swarmnet/net.go @@ -7,11 +7,11 @@ import ( ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" - inet "github.com/jbenet/go-ipfs/net" - ids "github.com/jbenet/go-ipfs/net/services/identify" - mux "github.com/jbenet/go-ipfs/net/services/mux" - relay "github.com/jbenet/go-ipfs/net/services/relay" - swarm "github.com/jbenet/go-ipfs/net/swarm" + inet "github.com/jbenet/go-ipfs/p2p/net" + ids "github.com/jbenet/go-ipfs/p2p/net/services/identify" + mux "github.com/jbenet/go-ipfs/p2p/net/services/mux" + relay "github.com/jbenet/go-ipfs/p2p/net/services/relay" + swarm "github.com/jbenet/go-ipfs/p2p/net/swarm" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" ctxgroup "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-ctxgroup" diff --git a/net/swarmnet/net_test.go b/p2p/net/swarmnet/net_test.go similarity index 95% rename from net/swarmnet/net_test.go rename to p2p/net/swarmnet/net_test.go index 24f4c497c..90067e0fb 100644 --- a/net/swarmnet/net_test.go +++ b/p2p/net/swarmnet/net_test.go @@ -7,8 +7,8 @@ import ( context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" - inet "github.com/jbenet/go-ipfs/net" - netutil "github.com/jbenet/go-ipfs/net/swarmnet/util" + inet "github.com/jbenet/go-ipfs/p2p/net" + netutil "github.com/jbenet/go-ipfs/p2p/net/swarmnet/util" ) // TestConnectednessCorrect starts a few networks, connects a few diff --git a/net/swarmnet/util/util.go b/p2p/net/swarmnet/util/util.go similarity index 88% rename from net/swarmnet/util/util.go rename to p2p/net/swarmnet/util/util.go index 2f0f1f146..f82f11789 100644 --- a/net/swarmnet/util/util.go +++ b/p2p/net/swarmnet/util/util.go @@ -3,8 +3,8 @@ package testutil import ( "testing" - inet "github.com/jbenet/go-ipfs/net" - sn "github.com/jbenet/go-ipfs/net/swarmnet" + inet "github.com/jbenet/go-ipfs/p2p/net" + sn "github.com/jbenet/go-ipfs/p2p/net/swarmnet" peer "github.com/jbenet/go-ipfs/p2p/peer" tu "github.com/jbenet/go-ipfs/util/testutil" diff --git a/routing/dht/dht.go b/routing/dht/dht.go index ed9858c7a..4e9e670d8 100644 --- a/routing/dht/dht.go +++ b/routing/dht/dht.go @@ -10,7 +10,7 @@ import ( "sync" "time" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" routing "github.com/jbenet/go-ipfs/routing" pb "github.com/jbenet/go-ipfs/routing/dht/pb" diff --git a/routing/dht/dht_net.go b/routing/dht/dht_net.go index 3eea25d9e..3d9bbd93f 100644 --- a/routing/dht/dht_net.go +++ b/routing/dht/dht_net.go @@ -4,7 +4,7 @@ import ( "errors" "time" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" pb "github.com/jbenet/go-ipfs/routing/dht/pb" ctxutil "github.com/jbenet/go-ipfs/util/ctx" diff --git a/routing/dht/dht_test.go b/routing/dht/dht_test.go index f4f2a5414..18fd74274 100644 --- a/routing/dht/dht_test.go +++ b/routing/dht/dht_test.go @@ -14,7 +14,7 @@ import ( dssync "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" - swarmnet "github.com/jbenet/go-ipfs/net/swarmnet" + swarmnet "github.com/jbenet/go-ipfs/p2p/net/swarmnet" peer "github.com/jbenet/go-ipfs/p2p/peer" routing "github.com/jbenet/go-ipfs/routing" u "github.com/jbenet/go-ipfs/util" diff --git a/routing/dht/ext_test.go b/routing/dht/ext_test.go index 168a2d8ed..f76f5bddc 100644 --- a/routing/dht/ext_test.go +++ b/routing/dht/ext_test.go @@ -4,8 +4,8 @@ import ( "math/rand" "testing" - inet "github.com/jbenet/go-ipfs/net" - mocknet "github.com/jbenet/go-ipfs/net/mock" + inet "github.com/jbenet/go-ipfs/p2p/net" + mocknet "github.com/jbenet/go-ipfs/p2p/net/mock" peer "github.com/jbenet/go-ipfs/p2p/peer" routing "github.com/jbenet/go-ipfs/routing" pb "github.com/jbenet/go-ipfs/routing/dht/pb" diff --git a/routing/dht/pb/message.go b/routing/dht/pb/message.go index 87b0b1f4c..61bf41ebb 100644 --- a/routing/dht/pb/message.go +++ b/routing/dht/pb/message.go @@ -3,7 +3,7 @@ package dht_pb import ( ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" eventlog "github.com/jbenet/go-ipfs/util/eventlog" ) diff --git a/routing/dht/query.go b/routing/dht/query.go index 95e3c3c90..5b62a8f4c 100644 --- a/routing/dht/query.go +++ b/routing/dht/query.go @@ -3,7 +3,7 @@ package dht import ( "sync" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" queue "github.com/jbenet/go-ipfs/p2p/peer/queue" "github.com/jbenet/go-ipfs/routing" diff --git a/routing/dht/routing.go b/routing/dht/routing.go index ee71f7156..4c3cf160b 100644 --- a/routing/dht/routing.go +++ b/routing/dht/routing.go @@ -6,7 +6,7 @@ import ( context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" - inet "github.com/jbenet/go-ipfs/net" + inet "github.com/jbenet/go-ipfs/p2p/net" peer "github.com/jbenet/go-ipfs/p2p/peer" "github.com/jbenet/go-ipfs/routing" pb "github.com/jbenet/go-ipfs/routing/dht/pb" diff --git a/routing/mock/dht.go b/routing/mock/dht.go index 1dfa415e0..1f0340ebb 100644 --- a/routing/mock/dht.go +++ b/routing/mock/dht.go @@ -4,7 +4,7 @@ import ( context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore" sync "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync" - mocknet "github.com/jbenet/go-ipfs/net/mock" + mocknet "github.com/jbenet/go-ipfs/p2p/net/mock" dht "github.com/jbenet/go-ipfs/routing/dht" "github.com/jbenet/go-ipfs/util/testutil" )