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-kad-dht
Commits
7467be37
Commit
7467be37
authored
Jan 28, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go-keyspace dep from libp2p added
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
a5e5c57f
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
32 additions
and
32 deletions
+32
-32
dht.go
dht.go
+4
-4
dht_bootstrap.go
dht_bootstrap.go
+1
-1
dht_net.go
dht_net.go
+3
-3
dht_test.go
dht_test.go
+3
-3
diag.go
diag.go
+1
-1
ext_test.go
ext_test.go
+3
-3
handlers.go
handlers.go
+2
-2
lookup.go
lookup.go
+2
-2
notif.go
notif.go
+1
-1
pb/message.go
pb/message.go
+2
-2
providers.go
providers.go
+1
-1
providers_test.go
providers_test.go
+1
-1
query.go
query.go
+2
-2
records.go
records.go
+3
-3
routing.go
routing.go
+3
-3
No files found.
dht.go
View file @
7467be37
...
...
@@ -14,11 +14,11 @@ import (
pb
"github.com/ipfs/go-ipfs/routing/dht/pb"
kb
"github.com/ipfs/go-ipfs/routing/kbucket"
record
"github.com/ipfs/go-ipfs/routing/record"
ci
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/crypto"
host
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/host"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
protocol
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/protocol"
logging
"gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log"
ci
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/crypto"
host
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/host"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
protocol
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/protocol"
proto
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
...
...
dht_bootstrap.go
View file @
7467be37
...
...
@@ -10,7 +10,7 @@ import (
routing
"github.com/ipfs/go-ipfs/routing"
u
"github.com/ipfs/go-ipfs/util"
peer
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
peer
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
goprocess
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
periodicproc
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/periodic"
...
...
dht_net.go
View file @
7467be37
...
...
@@ -6,10 +6,10 @@ import (
ggio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/io"
ctxio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-context/io"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
pb
"github.com/ipfs/go-ipfs/routing/dht/pb"
inet
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
inet
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/net"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
// handleNewStream implements the inet.StreamHandler
...
...
dht_test.go
View file @
7467be37
...
...
@@ -11,15 +11,15 @@ import (
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
dssync
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
ma
"gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
routing
"github.com/ipfs/go-ipfs/routing"
record
"github.com/ipfs/go-ipfs/routing/record"
u
"github.com/ipfs/go-ipfs/util"
peer
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
netutil
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/test/util"
peer
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
netutil
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/test/util"
ci
"github.com/ipfs/go-ipfs/util/testutil/ci"
travisci
"github.com/ipfs/go-ipfs/util/testutil/ci/travis"
...
...
diag.go
View file @
7467be37
...
...
@@ -4,7 +4,7 @@ import (
"encoding/json"
"time"
peer
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
peer
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
)
type
connDiagInfo
struct
{
...
...
ext_test.go
View file @
7467be37
...
...
@@ -17,9 +17,9 @@ import (
pb
"github.com/ipfs/go-ipfs/routing/dht/pb"
record
"github.com/ipfs/go-ipfs/routing/record"
u
"github.com/ipfs/go-ipfs/util"
inet
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/net"
mocknet
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/net/mock"
peer
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
inet
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/net"
mocknet
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/net/mock"
peer
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
)
func
TestGetFailures
(
t
*
testing
.
T
)
{
...
...
handlers.go
View file @
7467be37
...
...
@@ -7,12 +7,12 @@ import (
proto
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
pb
"github.com/ipfs/go-ipfs/routing/dht/pb"
u
"github.com/ipfs/go-ipfs/util"
lgbl
"github.com/ipfs/go-ipfs/util/eventlog/loggables"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
// The number of closer peers to send on requests.
...
...
lookup.go
View file @
7467be37
package
dht
import
(
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
notif
"github.com/ipfs/go-ipfs/notifications"
kb
"github.com/ipfs/go-ipfs/routing/kbucket"
pset
"github.com/ipfs/go-ipfs/util/peerset"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
// Required in order for proper JSON marshaling
...
...
notif.go
View file @
7467be37
...
...
@@ -3,7 +3,7 @@ package dht
import
(
ma
"gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr"
inet
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/net"
inet
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/net"
)
// netNotifiee defines methods to be used with the IpfsDHT
...
...
pb/message.go
View file @
7467be37
...
...
@@ -4,9 +4,9 @@ import (
ma
"gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr"
key
"github.com/ipfs/go-ipfs/blocks/key"
inet
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/net"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
logging
"gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log"
inet
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
)
var
log
=
logging
.
Logger
(
"dht.pb"
)
...
...
providers.go
View file @
7467be37
...
...
@@ -6,7 +6,7 @@ import (
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
goprocessctx
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
peer
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
peer
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
...
...
providers_test.go
View file @
7467be37
...
...
@@ -4,7 +4,7 @@ import (
"testing"
key
"github.com/ipfs/go-ipfs/blocks/key"
peer
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
peer
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
...
...
query.go
View file @
7467be37
...
...
@@ -9,9 +9,9 @@ import (
u
"github.com/ipfs/go-ipfs/util"
pset
"github.com/ipfs/go-ipfs/util/peerset"
todoctr
"github.com/ipfs/go-ipfs/util/todocounter"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
queue
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer/queue"
logging
"gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
queue
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer/queue"
process
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
ctxproc
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context"
...
...
records.go
View file @
7467be37
...
...
@@ -5,12 +5,12 @@ import (
"time"
ctxfrac
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-context/frac"
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
routing
"github.com/ipfs/go-ipfs/routing"
pb
"github.com/ipfs/go-ipfs/routing/dht/pb"
record
"github.com/ipfs/go-ipfs/routing/record"
ci
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/crypto"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
ci
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/crypto"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
// MaxRecordAge specifies the maximum time that any node will hold onto a record
...
...
routing.go
View file @
7467be37
...
...
@@ -5,7 +5,6 @@ import (
"sync"
"time"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
notif
"github.com/ipfs/go-ipfs/notifications"
"github.com/ipfs/go-ipfs/routing"
...
...
@@ -13,8 +12,9 @@ import (
kb
"github.com/ipfs/go-ipfs/routing/kbucket"
record
"github.com/ipfs/go-ipfs/routing/record"
pset
"github.com/ipfs/go-ipfs/util/peerset"
inet
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
inet
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/net"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
// asyncQueryBuffer is the size of buffered channels in async queries. This
...
...
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