Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-swarm
Commits
22b1351f
Commit
22b1351f
authored
Oct 04, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extract net interface and metrics
parent
4f68cf39
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
21 deletions
+16
-21
swarm.go
swarm.go
+3
-4
swarm_addr_test.go
swarm_addr_test.go
+1
-2
swarm_conn.go
swarm_conn.go
+1
-1
swarm_listen.go
swarm_listen.go
+2
-3
swarm_net.go
swarm_net.go
+3
-4
swarm_net_test.go
swarm_net_test.go
+2
-2
swarm_notif_test.go
swarm_notif_test.go
+1
-1
swarm_stream.go
swarm_stream.go
+1
-1
swarm_test.go
swarm_test.go
+2
-3
No files found.
swarm.go
View file @
22b1351f
...
...
@@ -11,10 +11,6 @@ import (
"sync"
"time"
metrics
"github.com/libp2p/go-libp2p/p2p/metrics"
mconn
"github.com/libp2p/go-libp2p/p2p/metrics/conn"
inet
"github.com/libp2p/go-libp2p/p2p/net"
ci
"github.com/ipfs/go-libp2p-crypto"
peer
"github.com/ipfs/go-libp2p-peer"
pstore
"github.com/ipfs/go-libp2p-peerstore"
...
...
@@ -26,6 +22,9 @@ import (
goprocessctx
"github.com/jbenet/goprocess/context"
addrutil
"github.com/libp2p/go-addr-util"
conn
"github.com/libp2p/go-libp2p-conn"
metrics
"github.com/libp2p/go-libp2p-metrics"
mconn
"github.com/libp2p/go-libp2p-metrics/conn"
inet
"github.com/libp2p/go-libp2p-net"
transport
"github.com/libp2p/go-libp2p-transport"
filter
"github.com/libp2p/go-maddr-filter"
tcpt
"github.com/libp2p/go-tcp-transport"
...
...
swarm_addr_test.go
View file @
22b1351f
...
...
@@ -4,11 +4,10 @@ import (
"context"
"testing"
metrics
"github.com/libp2p/go-libp2p/p2p/metrics"
pstore
"github.com/ipfs/go-libp2p-peerstore"
ma
"github.com/jbenet/go-multiaddr"
addrutil
"github.com/libp2p/go-addr-util"
metrics
"github.com/libp2p/go-libp2p-metrics"
testutil
"github.com/libp2p/go-testutil"
)
...
...
swarm_conn.go
View file @
22b1351f
...
...
@@ -4,7 +4,7 @@ import (
"context"
"fmt"
inet
"github.com/libp2p/go-libp2p
/p2p/
net"
inet
"github.com/libp2p/go-libp2p
-
net"
ic
"github.com/ipfs/go-libp2p-crypto"
peer
"github.com/ipfs/go-libp2p-peer"
...
...
swarm_listen.go
View file @
22b1351f
...
...
@@ -4,14 +4,13 @@ import (
"context"
"fmt"
inet
"github.com/libp2p/go-libp2p/p2p/net"
lgbl
"github.com/ipfs/go-libp2p-loggables"
ma
"github.com/jbenet/go-multiaddr"
ps
"github.com/jbenet/go-peerstream"
conn
"github.com/libp2p/go-libp2p-conn"
mconn
"github.com/libp2p/go-libp2p-metrics/conn"
inet
"github.com/libp2p/go-libp2p-net"
transport
"github.com/libp2p/go-libp2p-transport"
mconn
"github.com/libp2p/go-libp2p/p2p/metrics/conn"
)
func
(
s
*
Swarm
)
AddListenAddr
(
a
ma
.
Multiaddr
)
error
{
...
...
swarm_net.go
View file @
22b1351f
package
swarm
import
(
"context"
"fmt"
peer
"github.com/ipfs/go-libp2p-peer"
pstore
"github.com/ipfs/go-libp2p-peerstore"
metrics
"github.com/libp2p/go-libp2p/p2p/metrics"
inet
"github.com/libp2p/go-libp2p/p2p/net"
"context"
ma
"github.com/jbenet/go-multiaddr"
"github.com/jbenet/goprocess"
metrics
"github.com/libp2p/go-libp2p-metrics"
inet
"github.com/libp2p/go-libp2p-net"
)
// Network implements the inet.Network interface.
...
...
swarm_net_test.go
View file @
22b1351f
...
...
@@ -5,9 +5,9 @@ import (
"testing"
"time"
inet
"github.com/libp2p/go-libp2p/p2p/net"
testutil
"github.com/libp2p/go-libp2p/p2p/test/util"
"context"
inet
"github.com/libp2p/go-libp2p-net"
testutil
"github.com/libp2p/go-libp2p/p2p/test/util"
)
// TestConnectednessCorrect starts a few networks, connects a few
...
...
swarm_notif_test.go
View file @
22b1351f
...
...
@@ -7,7 +7,7 @@ import (
"context"
peer
"github.com/ipfs/go-libp2p-peer"
ma
"github.com/jbenet/go-multiaddr"
inet
"github.com/libp2p/go-libp2p
/p2p/
net"
inet
"github.com/libp2p/go-libp2p
-
net"
)
func
streamsSame
(
a
,
b
inet
.
Stream
)
bool
{
...
...
swarm_stream.go
View file @
22b1351f
package
swarm
import
(
inet
"github.com/libp2p/go-libp2p-net"
protocol
"github.com/libp2p/go-libp2p-protocol"
inet
"github.com/libp2p/go-libp2p/p2p/net"
ps
"github.com/jbenet/go-peerstream"
)
...
...
swarm_test.go
View file @
22b1351f
...
...
@@ -10,12 +10,11 @@ import (
"testing"
"time"
metrics
"github.com/libp2p/go-libp2p/p2p/metrics"
inet
"github.com/libp2p/go-libp2p/p2p/net"
peer
"github.com/ipfs/go-libp2p-peer"
pstore
"github.com/ipfs/go-libp2p-peerstore"
ma
"github.com/jbenet/go-multiaddr"
metrics
"github.com/libp2p/go-libp2p-metrics"
inet
"github.com/libp2p/go-libp2p-net"
testutil
"github.com/libp2p/go-testutil"
)
...
...
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