Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
2392434b
Commit
2392434b
authored
Sep 30, 2015
by
Juan Batiz-Benet
Browse files
rewrote imports to p2p
parent
5dd1bd5e
Changes
63
Show whitespace changes
Inline
Side-by-side
p2p/crypto/key.go
View file @
2392434b
...
@@ -21,9 +21,9 @@ import (
...
@@ -21,9 +21,9 @@ import (
proto
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
proto
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
pb
"github.com/ipfs/go-ipfs/p2p/crypto/pb"
u
"github.com/ipfs/go-ipfs/util"
u
"github.com/ipfs/go-ipfs/util"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
pb
"github.com/ipfs/go-libp2p/p2p/crypto/pb"
)
)
var
log
=
logging
.
Logger
(
"crypto"
)
var
log
=
logging
.
Logger
(
"crypto"
)
...
...
p2p/crypto/key_test.go
View file @
2392434b
package
crypto_test
package
crypto_test
import
(
import
(
.
"github.com/ipfs/go-
ipfs
/p2p/crypto"
.
"github.com/ipfs/go-
libp2p
/p2p/crypto"
"bytes"
"bytes"
tu
"github.com/ipfs/go-ipfs/util/testutil"
tu
"github.com/ipfs/go-ipfs/util/testutil"
...
...
p2p/crypto/rsa.go
View file @
2392434b
...
@@ -10,7 +10,7 @@ import (
...
@@ -10,7 +10,7 @@ import (
proto
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
proto
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
pb
"github.com/ipfs/go-
ipfs
/p2p/crypto/pb"
pb
"github.com/ipfs/go-
libp2p
/p2p/crypto/pb"
)
)
type
RsaPrivateKey
struct
{
type
RsaPrivateKey
struct
{
...
...
p2p/crypto/secio/al.go
View file @
2392434b
...
@@ -14,7 +14,7 @@ import (
...
@@ -14,7 +14,7 @@ import (
"hash"
"hash"
bfish
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/crypto/blowfish"
bfish
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/crypto/blowfish"
ci
"github.com/ipfs/go-
ipfs
/p2p/crypto"
ci
"github.com/ipfs/go-
libp2p
/p2p/crypto"
)
)
// List of supported ECDH curves
// List of supported ECDH curves
...
...
p2p/crypto/secio/interface.go
View file @
2392434b
...
@@ -4,11 +4,11 @@ package secio
...
@@ -4,11 +4,11 @@ package secio
import
(
import
(
"io"
"io"
ci
"github.com/ipfs/go-
ipfs
/p2p/crypto"
ci
"github.com/ipfs/go-
libp2p
/p2p/crypto"
msgio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-msgio"
msgio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-msgio"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
peer
"github.com/ipfs/go-
ipfs
/p2p/peer"
peer
"github.com/ipfs/go-
libp2p
/p2p/peer"
)
)
// SessionGenerator constructs secure communication sessions for a peer.
// SessionGenerator constructs secure communication sessions for a peer.
...
...
p2p/crypto/secio/protocol.go
View file @
2392434b
...
@@ -11,11 +11,11 @@ import (
...
@@ -11,11 +11,11 @@ import (
msgio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-msgio"
msgio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-msgio"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
ci
"github.com/ipfs/go-ipfs/p2p/crypto"
pb
"github.com/ipfs/go-ipfs/p2p/crypto/secio/pb"
peer
"github.com/ipfs/go-ipfs/p2p/peer"
u
"github.com/ipfs/go-ipfs/util"
u
"github.com/ipfs/go-ipfs/util"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
ci
"github.com/ipfs/go-libp2p/p2p/crypto"
pb
"github.com/ipfs/go-libp2p/p2p/crypto/secio/pb"
peer
"github.com/ipfs/go-libp2p/p2p/peer"
)
)
var
log
=
logging
.
Logger
(
"secio"
)
var
log
=
logging
.
Logger
(
"secio"
)
...
...
p2p/discovery/mdns.go
View file @
2392434b
...
@@ -13,9 +13,9 @@ import (
...
@@ -13,9 +13,9 @@ import (
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
manet
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
manet
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
"github.com/ipfs/go-ipfs/p2p/host"
"github.com/ipfs/go-ipfs/p2p/peer"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
"github.com/ipfs/go-libp2p/p2p/host"
"github.com/ipfs/go-libp2p/p2p/peer"
)
)
var
log
=
logging
.
Logger
(
"mdns"
)
var
log
=
logging
.
Logger
(
"mdns"
)
...
...
p2p/host/basic/basic_host.go
View file @
2392434b
...
@@ -6,15 +6,15 @@ import (
...
@@ -6,15 +6,15 @@ import (
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
goprocess
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
goprocess
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
metrics
"github.com/ipfs/go-ipfs/metrics"
mstream
"github.com/ipfs/go-ipfs/metrics/stream"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
metrics
"github.com/ipfs/go-libp2p/util/metrics"
inet
"github.com/ipfs/go-ipfs/p2p/net"
mstream
"github.com/ipfs/go-libp2p/util/metrics/stream"
peer
"github.com/ipfs/go-ipfs/p2p/peer"
protocol
"github.com/ipfs/go-ipfs/p2p/protocol"
inet
"github.com/ipfs/go-libp2p/p2p/net"
identify
"github.com/ipfs/go-ipfs/p2p/protocol/identify"
peer
"github.com/ipfs/go-libp2p/p2p/peer"
relay
"github.com/ipfs/go-ipfs/p2p/protocol/relay"
protocol
"github.com/ipfs/go-libp2p/p2p/protocol"
identify
"github.com/ipfs/go-libp2p/p2p/protocol/identify"
relay
"github.com/ipfs/go-libp2p/p2p/protocol/relay"
)
)
var
log
=
logging
.
Logger
(
"p2p/host/basic"
)
var
log
=
logging
.
Logger
(
"p2p/host/basic"
)
...
...
p2p/host/basic/basic_host_test.go
View file @
2392434b
...
@@ -5,9 +5,9 @@ import (
...
@@ -5,9 +5,9 @@ import (
"io"
"io"
"testing"
"testing"
inet
"github.com/ipfs/go-
ipfs
/p2p/net"
inet
"github.com/ipfs/go-
libp2p
/p2p/net"
protocol
"github.com/ipfs/go-
ipfs
/p2p/protocol"
protocol
"github.com/ipfs/go-
libp2p
/p2p/protocol"
testutil
"github.com/ipfs/go-
ipfs
/p2p/test/util"
testutil
"github.com/ipfs/go-
libp2p
/p2p/test/util"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
)
)
...
...
p2p/host/basic/natmgr.go
View file @
2392434b
...
@@ -7,9 +7,9 @@ import (
...
@@ -7,9 +7,9 @@ import (
goprocess
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
goprocess
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
inat
"github.com/ipfs/go-
ipfs
/p2p/nat"
inat
"github.com/ipfs/go-
libp2p
/p2p/nat"
inet
"github.com/ipfs/go-
ipfs
/p2p/net"
inet
"github.com/ipfs/go-
libp2p
/p2p/net"
lgbl
"github.com/ipfs/go-
ipfs
/util/eventlog/loggables"
lgbl
"github.com/ipfs/go-
libp2p
/util/eventlog/loggables"
)
)
// natManager takes care of adding + removing port mappings to the nat.
// natManager takes care of adding + removing port mappings to the nat.
...
...
p2p/host/host.go
View file @
2392434b
...
@@ -3,11 +3,11 @@ package host
...
@@ -3,11 +3,11 @@ package host
import
(
import
(
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
metrics
"github.com/ipfs/go-ipfs/metrics"
inet
"github.com/ipfs/go-ipfs/p2p/net"
peer
"github.com/ipfs/go-ipfs/p2p/peer"
protocol
"github.com/ipfs/go-ipfs/p2p/protocol"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
inet
"github.com/ipfs/go-libp2p/p2p/net"
peer
"github.com/ipfs/go-libp2p/p2p/peer"
protocol
"github.com/ipfs/go-libp2p/p2p/protocol"
metrics
"github.com/ipfs/go-libp2p/util/metrics"
)
)
var
log
=
logging
.
Logger
(
"p2p/host"
)
var
log
=
logging
.
Logger
(
"p2p/host"
)
...
...
p2p/host/routed/routed.go
View file @
2392434b
...
@@ -7,14 +7,14 @@ import (
...
@@ -7,14 +7,14 @@ import (
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
lgbl
"github.com/ipfs/go-
ipfs
/util/eventlog/loggables"
lgbl
"github.com/ipfs/go-
libp2p
/util/eventlog/loggables"
metrics
"github.com/ipfs/go-ipfs/metrics"
host
"github.com/ipfs/go-ipfs/p2p/host"
inet
"github.com/ipfs/go-ipfs/p2p/net"
peer
"github.com/ipfs/go-ipfs/p2p/peer"
protocol
"github.com/ipfs/go-ipfs/p2p/protocol"
routing
"github.com/ipfs/go-ipfs/routing"
routing
"github.com/ipfs/go-ipfs/routing"
host
"github.com/ipfs/go-libp2p/p2p/host"
inet
"github.com/ipfs/go-libp2p/p2p/net"
peer
"github.com/ipfs/go-libp2p/p2p/peer"
protocol
"github.com/ipfs/go-libp2p/p2p/protocol"
metrics
"github.com/ipfs/go-libp2p/util/metrics"
)
)
var
log
=
logging
.
Logger
(
"p2p/host/routed"
)
var
log
=
logging
.
Logger
(
"p2p/host/routed"
)
...
...
p2p/net/conn/conn.go
View file @
2392434b
...
@@ -11,11 +11,11 @@ import (
...
@@ -11,11 +11,11 @@ import (
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
manet
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
manet
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
ic
"github.com/ipfs/go-ipfs/p2p/crypto"
peer
"github.com/ipfs/go-ipfs/p2p/peer"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
u
"github.com/ipfs/go-ipfs/util"
u
"github.com/ipfs/go-ipfs/util"
lgbl
"github.com/ipfs/go-ipfs/util/eventlog/loggables"
logging
"github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
ic
"github.com/ipfs/go-libp2p/p2p/crypto"
peer
"github.com/ipfs/go-libp2p/p2p/peer"
lgbl
"github.com/ipfs/go-libp2p/util/eventlog/loggables"
)
)
var
log
=
logging
.
Logger
(
"conn"
)
var
log
=
logging
.
Logger
(
"conn"
)
...
...
p2p/net/conn/dial.go
View file @
2392434b
...
@@ -11,10 +11,10 @@ import (
...
@@ -11,10 +11,10 @@ import (
manet
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
manet
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
reuseport
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-reuseport"
reuseport
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-reuseport"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
lgbl
"github.com/ipfs/go-
ipfs
/util/eventlog/loggables"
lgbl
"github.com/ipfs/go-
libp2p
/util/eventlog/loggables"
addrutil
"github.com/ipfs/go-
ipfs
/p2p/net/swarm/addr"
addrutil
"github.com/ipfs/go-
libp2p
/p2p/net/swarm/addr"
peer
"github.com/ipfs/go-
ipfs
/p2p/peer"
peer
"github.com/ipfs/go-
libp2p
/p2p/peer"
)
)
// String returns the string rep of d.
// String returns the string rep of d.
...
...
p2p/net/conn/interface.go
View file @
2392434b
...
@@ -6,9 +6,9 @@ import (
...
@@ -6,9 +6,9 @@ import (
"time"
"time"
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
ic
"github.com/ipfs/go-
ipfs
/p2p/crypto"
ic
"github.com/ipfs/go-
libp2p
/p2p/crypto"
filter
"github.com/ipfs/go-
ipfs
/p2p/net/filter"
filter
"github.com/ipfs/go-
libp2p
/p2p/net/filter"
peer
"github.com/ipfs/go-
ipfs
/p2p/peer"
peer
"github.com/ipfs/go-
libp2p
/p2p/peer"
msgio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-msgio"
msgio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-msgio"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
...
...
p2p/net/conn/listen.go
View file @
2392434b
...
@@ -13,9 +13,9 @@ import (
...
@@ -13,9 +13,9 @@ import (
goprocessctx
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context"
goprocessctx
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
ic
"github.com/ipfs/go-
ipfs
/p2p/crypto"
ic
"github.com/ipfs/go-
libp2p
/p2p/crypto"
filter
"github.com/ipfs/go-
ipfs
/p2p/net/filter"
filter
"github.com/ipfs/go-
libp2p
/p2p/net/filter"
peer
"github.com/ipfs/go-
ipfs
/p2p/peer"
peer
"github.com/ipfs/go-
libp2p
/p2p/peer"
)
)
// ConnWrapper is any function that wraps a raw multiaddr connection
// ConnWrapper is any function that wraps a raw multiaddr connection
...
...
p2p/net/conn/secure_conn.go
View file @
2392434b
...
@@ -8,9 +8,9 @@ import (
...
@@ -8,9 +8,9 @@ import (
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
ic
"github.com/ipfs/go-
ipfs
/p2p/crypto"
ic
"github.com/ipfs/go-
libp2p
/p2p/crypto"
secio
"github.com/ipfs/go-
ipfs
/p2p/crypto/secio"
secio
"github.com/ipfs/go-
libp2p
/p2p/crypto/secio"
peer
"github.com/ipfs/go-
ipfs
/p2p/peer"
peer
"github.com/ipfs/go-
libp2p
/p2p/peer"
)
)
// secureConn wraps another Conn object with an encrypted channel.
// secureConn wraps another Conn object with an encrypted channel.
...
...
p2p/net/conn/secure_conn_test.go
View file @
2392434b
...
@@ -7,8 +7,8 @@ import (
...
@@ -7,8 +7,8 @@ import (
"testing"
"testing"
"time"
"time"
ic
"github.com/ipfs/go-ipfs/p2p/crypto"
travis
"github.com/ipfs/go-ipfs/util/testutil/ci/travis"
travis
"github.com/ipfs/go-ipfs/util/testutil/ci/travis"
ic
"github.com/ipfs/go-libp2p/p2p/crypto"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
)
)
...
...
p2p/net/interface.go
View file @
2392434b
...
@@ -3,8 +3,8 @@ package net
...
@@ -3,8 +3,8 @@ package net
import
(
import
(
"io"
"io"
conn
"github.com/ipfs/go-
ipfs
/p2p/net/conn"
conn
"github.com/ipfs/go-
libp2p
/p2p/net/conn"
peer
"github.com/ipfs/go-
ipfs
/p2p/peer"
peer
"github.com/ipfs/go-
libp2p
/p2p/peer"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
...
...
p2p/net/mock/interface.go
View file @
2392434b
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
package
mocknet
package
mocknet
import
(
import
(
ic
"github.com/ipfs/go-
ipfs
/p2p/crypto"
ic
"github.com/ipfs/go-
libp2p
/p2p/crypto"
host
"github.com/ipfs/go-
ipfs
/p2p/host"
host
"github.com/ipfs/go-
libp2p
/p2p/host"
inet
"github.com/ipfs/go-
ipfs
/p2p/net"
inet
"github.com/ipfs/go-
libp2p
/p2p/net"
peer
"github.com/ipfs/go-
ipfs
/p2p/peer"
peer
"github.com/ipfs/go-
libp2p
/p2p/peer"
"io"
"io"
"time"
"time"
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment