mirror of
https://github.com/fluencelabs/go-libp2p-kad-dht
synced 2025-04-25 06:42:13 +00:00
Undo gx rewrites and add gx package.json
This commit is contained in:
parent
be1a0dd77a
commit
5f3e63aa46
22
dht.go
22
dht.go
@ -16,17 +16,17 @@ import (
|
|||||||
kb "github.com/ipfs/go-ipfs/routing/kbucket"
|
kb "github.com/ipfs/go-ipfs/routing/kbucket"
|
||||||
record "github.com/ipfs/go-ipfs/routing/record"
|
record "github.com/ipfs/go-ipfs/routing/record"
|
||||||
|
|
||||||
logging "gx/ipfs/QmNQynaz7qfriSUJkiEZUrm2Wen1u3Kj9goZzWtrPyu7XR/go-log"
|
proto "github.com/gogo/protobuf/proto"
|
||||||
pstore "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore"
|
ds "github.com/ipfs/go-datastore"
|
||||||
goprocess "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess"
|
ci "github.com/ipfs/go-libp2p-crypto"
|
||||||
goprocessctx "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess/context"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
pstore "github.com/ipfs/go-libp2p-peerstore"
|
||||||
ds "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore"
|
host "github.com/ipfs/go-libp2p/p2p/host"
|
||||||
ci "gx/ipfs/QmUWER4r4qMvaCnX5zREcfyiWN7cXN9g3a7fkRqNz8qWPP/go-libp2p-crypto"
|
protocol "github.com/ipfs/go-libp2p/p2p/protocol"
|
||||||
host "gx/ipfs/QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms/go-libp2p/p2p/host"
|
logging "github.com/ipfs/go-log"
|
||||||
protocol "gx/ipfs/QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms/go-libp2p/p2p/protocol"
|
goprocess "github.com/jbenet/goprocess"
|
||||||
proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
|
goprocessctx "github.com/jbenet/goprocess/context"
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.Logger("dht")
|
var log = logging.Logger("dht")
|
||||||
|
@ -8,13 +8,13 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
u "github.com/ipfs/go-ipfs-util"
|
||||||
routing "github.com/ipfs/go-ipfs/routing"
|
routing "github.com/ipfs/go-ipfs/routing"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util"
|
|
||||||
|
|
||||||
goprocess "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess"
|
goprocess "github.com/jbenet/goprocess"
|
||||||
periodicproc "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess/periodic"
|
periodicproc "github.com/jbenet/goprocess/periodic"
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BootstrapConfig specifies parameters used bootstrapping the DHT.
|
// BootstrapConfig specifies parameters used bootstrapping the DHT.
|
||||||
|
10
dht_net.go
10
dht_net.go
@ -5,12 +5,12 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
ggio "github.com/gogo/protobuf/io"
|
||||||
pb "github.com/ipfs/go-ipfs/routing/dht/pb"
|
pb "github.com/ipfs/go-ipfs/routing/dht/pb"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
inet "gx/ipfs/QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms/go-libp2p/p2p/net"
|
inet "github.com/ipfs/go-libp2p/p2p/net"
|
||||||
ctxio "gx/ipfs/QmX6DhWrpBB5NtadXmPSXYNdVvuLfJXoFNMvUMoVvP5UJa/go-context/io"
|
ctxio "github.com/jbenet/go-context/io"
|
||||||
ggio "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io"
|
context "golang.org/x/net/context"
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var dhtReadMessageTimeout = time.Minute
|
var dhtReadMessageTimeout = time.Minute
|
||||||
|
16
dht_test.go
16
dht_test.go
@ -9,20 +9,20 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
ds "github.com/ipfs/go-datastore"
|
||||||
|
dssync "github.com/ipfs/go-datastore/sync"
|
||||||
key "github.com/ipfs/go-ipfs/blocks/key"
|
key "github.com/ipfs/go-ipfs/blocks/key"
|
||||||
routing "github.com/ipfs/go-ipfs/routing"
|
routing "github.com/ipfs/go-ipfs/routing"
|
||||||
record "github.com/ipfs/go-ipfs/routing/record"
|
record "github.com/ipfs/go-ipfs/routing/record"
|
||||||
ci "github.com/ipfs/go-ipfs/thirdparty/testutil/ci"
|
ci "github.com/ipfs/go-ipfs/thirdparty/testutil/ci"
|
||||||
travisci "github.com/ipfs/go-ipfs/thirdparty/testutil/ci/travis"
|
travisci "github.com/ipfs/go-ipfs/thirdparty/testutil/ci/travis"
|
||||||
ds "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore"
|
|
||||||
dssync "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore/sync"
|
|
||||||
|
|
||||||
pstore "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore"
|
u "github.com/ipfs/go-ipfs-util"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
netutil "gx/ipfs/QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms/go-libp2p/p2p/test/util"
|
pstore "github.com/ipfs/go-libp2p-peerstore"
|
||||||
ma "gx/ipfs/QmYzDkkgAEmrcNzFCiYo6L1dTX4EAG1gZkbtdbd9trL4vd/go-multiaddr"
|
netutil "github.com/ipfs/go-libp2p/p2p/test/util"
|
||||||
u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util"
|
ma "github.com/jbenet/go-multiaddr"
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
var testCaseValues = map[key.Key][]byte{}
|
var testCaseValues = map[key.Key][]byte{}
|
||||||
|
16
ext_test.go
16
ext_test.go
@ -6,19 +6,19 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
ds "github.com/ipfs/go-datastore"
|
||||||
|
dssync "github.com/ipfs/go-datastore/sync"
|
||||||
key "github.com/ipfs/go-ipfs/blocks/key"
|
key "github.com/ipfs/go-ipfs/blocks/key"
|
||||||
routing "github.com/ipfs/go-ipfs/routing"
|
routing "github.com/ipfs/go-ipfs/routing"
|
||||||
pb "github.com/ipfs/go-ipfs/routing/dht/pb"
|
pb "github.com/ipfs/go-ipfs/routing/dht/pb"
|
||||||
record "github.com/ipfs/go-ipfs/routing/record"
|
record "github.com/ipfs/go-ipfs/routing/record"
|
||||||
ds "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore"
|
|
||||||
dssync "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore/sync"
|
|
||||||
|
|
||||||
pstore "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore"
|
ggio "github.com/gogo/protobuf/io"
|
||||||
inet "gx/ipfs/QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms/go-libp2p/p2p/net"
|
u "github.com/ipfs/go-ipfs-util"
|
||||||
mocknet "gx/ipfs/QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms/go-libp2p/p2p/net/mock"
|
pstore "github.com/ipfs/go-libp2p-peerstore"
|
||||||
ggio "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io"
|
inet "github.com/ipfs/go-libp2p/p2p/net"
|
||||||
u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util"
|
mocknet "github.com/ipfs/go-libp2p/p2p/net/mock"
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetFailures(t *testing.T) {
|
func TestGetFailures(t *testing.T) {
|
||||||
|
12
handlers.go
12
handlers.go
@ -5,16 +5,16 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
ds "github.com/ipfs/go-datastore"
|
||||||
key "github.com/ipfs/go-ipfs/blocks/key"
|
key "github.com/ipfs/go-ipfs/blocks/key"
|
||||||
pb "github.com/ipfs/go-ipfs/routing/dht/pb"
|
pb "github.com/ipfs/go-ipfs/routing/dht/pb"
|
||||||
lgbl "github.com/ipfs/go-ipfs/thirdparty/loggables"
|
lgbl "github.com/ipfs/go-ipfs/thirdparty/loggables"
|
||||||
ds "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore"
|
|
||||||
|
|
||||||
pstore "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore"
|
proto "github.com/gogo/protobuf/proto"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
u "github.com/ipfs/go-ipfs-util"
|
||||||
proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util"
|
pstore "github.com/ipfs/go-libp2p-peerstore"
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The number of closer peers to send on requests.
|
// The number of closer peers to send on requests.
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
kb "github.com/ipfs/go-ipfs/routing/kbucket"
|
kb "github.com/ipfs/go-ipfs/routing/kbucket"
|
||||||
pset "github.com/ipfs/go-ipfs/thirdparty/peerset"
|
pset "github.com/ipfs/go-ipfs/thirdparty/peerset"
|
||||||
|
|
||||||
pstore "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
pstore "github.com/ipfs/go-libp2p-peerstore"
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Required in order for proper JSON marshaling
|
// Required in order for proper JSON marshaling
|
||||||
|
4
notif.go
4
notif.go
@ -1,9 +1,9 @@
|
|||||||
package dht
|
package dht
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ma "gx/ipfs/QmYzDkkgAEmrcNzFCiYo6L1dTX4EAG1gZkbtdbd9trL4vd/go-multiaddr"
|
ma "github.com/jbenet/go-multiaddr"
|
||||||
|
|
||||||
inet "gx/ipfs/QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms/go-libp2p/p2p/net"
|
inet "github.com/ipfs/go-libp2p/p2p/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
// netNotifiee defines methods to be used with the IpfsDHT
|
// netNotifiee defines methods to be used with the IpfsDHT
|
||||||
|
101
package.json
Normal file
101
package.json
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
{
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/libp2p/go-libp2p-kad-dht"
|
||||||
|
},
|
||||||
|
"gx": {
|
||||||
|
"dvcsimport": "github.com/libp2p/go-libp2p-kad-dht",
|
||||||
|
"goversion": "1.5.2"
|
||||||
|
},
|
||||||
|
"gxDependencies": [
|
||||||
|
{
|
||||||
|
"hash": "QmNQynaz7qfriSUJkiEZUrm2Wen1u3Kj9goZzWtrPyu7XR",
|
||||||
|
"name": "go-log",
|
||||||
|
"version": "1.1.2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms",
|
||||||
|
"name": "go-libp2p",
|
||||||
|
"version": "3.3.7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "whyrusleeping",
|
||||||
|
"hash": "QmUWER4r4qMvaCnX5zREcfyiWN7cXN9g3a7fkRqNz8qWPP",
|
||||||
|
"name": "go-libp2p-crypto",
|
||||||
|
"version": "1.0.3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "whyrusleeping",
|
||||||
|
"hash": "QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs",
|
||||||
|
"name": "go-libp2p-peer",
|
||||||
|
"version": "1.0.8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt",
|
||||||
|
"name": "go-net",
|
||||||
|
"version": "0.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn",
|
||||||
|
"name": "goprocess",
|
||||||
|
"version": "0.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV",
|
||||||
|
"name": "gogo-protobuf",
|
||||||
|
"version": "0.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "cheggaaa",
|
||||||
|
"hash": "QmeWjRodbcZFKe5tMN7poEx3izym6osrLSnTLf9UjJZBbs",
|
||||||
|
"name": "pb",
|
||||||
|
"version": "1.0.3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "jbenet",
|
||||||
|
"hash": "QmX6DhWrpBB5NtadXmPSXYNdVvuLfJXoFNMvUMoVvP5UJa",
|
||||||
|
"name": "go-context",
|
||||||
|
"version": "0.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "jbenet",
|
||||||
|
"hash": "QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk",
|
||||||
|
"name": "go-datastore",
|
||||||
|
"version": "0.2.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "hashicorp",
|
||||||
|
"hash": "QmVYxfoJQiZijTgPNHCHgHELvQpbsJNTg6Crmc3dQkj3yy",
|
||||||
|
"name": "golang-lru",
|
||||||
|
"version": "0.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "whyrusleeping",
|
||||||
|
"hash": "QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P",
|
||||||
|
"name": "go-libp2p-peerstore",
|
||||||
|
"version": "1.1.2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "whyrusleeping",
|
||||||
|
"hash": "Qmb1DA2A9LS2wR4FFweB4uEDomFsdmnw1VLawLE1yQzudj",
|
||||||
|
"name": "base32",
|
||||||
|
"version": "0.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "whyrusleeping",
|
||||||
|
"hash": "QmVvJ27GcLaLSXvcB4auk3Gn3xuWK5ti5ENkZ2pCoJEYW4",
|
||||||
|
"name": "autobatch",
|
||||||
|
"version": "0.2.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "kubuxu",
|
||||||
|
"hash": "QmWQ2SJisXwcCLsUXLwYCKSfyExXjFRW2WbBH5sqCUnwX5",
|
||||||
|
"name": "bbloom",
|
||||||
|
"version": "0.0.2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"gxVersion": "0.4.0",
|
||||||
|
"language": "go",
|
||||||
|
"license": "MIT",
|
||||||
|
"name": "go-libp2p-kad-dht",
|
||||||
|
"version": "0.0.0"
|
||||||
|
}
|
@ -14,7 +14,7 @@ It has these top-level messages:
|
|||||||
*/
|
*/
|
||||||
package dht_pb
|
package dht_pb
|
||||||
|
|
||||||
import proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
|
import proto "github.com/gogo/protobuf/proto"
|
||||||
import math "math"
|
import math "math"
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package dht_pb
|
package dht_pb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ma "gx/ipfs/QmYzDkkgAEmrcNzFCiYo6L1dTX4EAG1gZkbtdbd9trL4vd/go-multiaddr"
|
ma "github.com/jbenet/go-multiaddr"
|
||||||
|
|
||||||
key "github.com/ipfs/go-ipfs/blocks/key"
|
key "github.com/ipfs/go-ipfs/blocks/key"
|
||||||
logging "gx/ipfs/QmNQynaz7qfriSUJkiEZUrm2Wen1u3Kj9goZzWtrPyu7XR/go-log"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
pstore "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore"
|
pstore "github.com/ipfs/go-libp2p-peerstore"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
inet "github.com/ipfs/go-libp2p/p2p/net"
|
||||||
inet "gx/ipfs/QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms/go-libp2p/p2p/net"
|
logging "github.com/ipfs/go-log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.Logger("dht.pb")
|
var log = logging.Logger("dht.pb")
|
||||||
|
@ -6,20 +6,20 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
logging "gx/ipfs/QmNQynaz7qfriSUJkiEZUrm2Wen1u3Kj9goZzWtrPyu7XR/go-log"
|
lru "github.com/hashicorp/golang-lru"
|
||||||
goprocess "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess"
|
ds "github.com/ipfs/go-datastore"
|
||||||
goprocessctx "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess/context"
|
dsq "github.com/ipfs/go-datastore/query"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
ds "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore"
|
logging "github.com/ipfs/go-log"
|
||||||
dsq "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore/query"
|
goprocess "github.com/jbenet/goprocess"
|
||||||
lru "gx/ipfs/QmVYxfoJQiZijTgPNHCHgHELvQpbsJNTg6Crmc3dQkj3yy/golang-lru"
|
goprocessctx "github.com/jbenet/goprocess/context"
|
||||||
autobatch "gx/ipfs/QmVvJ27GcLaLSXvcB4auk3Gn3xuWK5ti5ENkZ2pCoJEYW4/autobatch"
|
autobatch "github.com/whyrusleeping/autobatch"
|
||||||
base32 "gx/ipfs/Qmb1DA2A9LS2wR4FFweB4uEDomFsdmnw1VLawLE1yQzudj/base32"
|
base32 "github.com/whyrusleeping/base32"
|
||||||
|
|
||||||
key "github.com/ipfs/go-ipfs/blocks/key"
|
key "github.com/ipfs/go-ipfs/blocks/key"
|
||||||
flags "github.com/ipfs/go-ipfs/flags"
|
flags "github.com/ipfs/go-ipfs/flags"
|
||||||
|
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
var batchBufferSize = 256
|
var batchBufferSize = 256
|
||||||
|
@ -5,11 +5,11 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
ds "github.com/ipfs/go-datastore"
|
||||||
key "github.com/ipfs/go-ipfs/blocks/key"
|
key "github.com/ipfs/go-ipfs/blocks/key"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
ds "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore"
|
|
||||||
|
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestProviderManager(t *testing.T) {
|
func TestProviderManager(t *testing.T) {
|
||||||
|
16
query.go
16
query.go
@ -9,14 +9,14 @@ import (
|
|||||||
pset "github.com/ipfs/go-ipfs/thirdparty/peerset"
|
pset "github.com/ipfs/go-ipfs/thirdparty/peerset"
|
||||||
todoctr "github.com/ipfs/go-ipfs/thirdparty/todocounter"
|
todoctr "github.com/ipfs/go-ipfs/thirdparty/todocounter"
|
||||||
|
|
||||||
logging "gx/ipfs/QmNQynaz7qfriSUJkiEZUrm2Wen1u3Kj9goZzWtrPyu7XR/go-log"
|
u "github.com/ipfs/go-ipfs-util"
|
||||||
pstore "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
queue "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore/queue"
|
pstore "github.com/ipfs/go-libp2p-peerstore"
|
||||||
process "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess"
|
queue "github.com/ipfs/go-libp2p-peerstore/queue"
|
||||||
ctxproc "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess/context"
|
logging "github.com/ipfs/go-log"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
process "github.com/jbenet/goprocess"
|
||||||
u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util"
|
ctxproc "github.com/jbenet/goprocess/context"
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
var maxQueryConcurrency = AlphaValue
|
var maxQueryConcurrency = AlphaValue
|
||||||
|
@ -7,10 +7,10 @@ import (
|
|||||||
routing "github.com/ipfs/go-ipfs/routing"
|
routing "github.com/ipfs/go-ipfs/routing"
|
||||||
pb "github.com/ipfs/go-ipfs/routing/dht/pb"
|
pb "github.com/ipfs/go-ipfs/routing/dht/pb"
|
||||||
record "github.com/ipfs/go-ipfs/routing/record"
|
record "github.com/ipfs/go-ipfs/routing/record"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
ci "github.com/ipfs/go-libp2p-crypto"
|
||||||
ci "gx/ipfs/QmUWER4r4qMvaCnX5zREcfyiWN7cXN9g3a7fkRqNz8qWPP/go-libp2p-crypto"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
ctxfrac "gx/ipfs/QmX6DhWrpBB5NtadXmPSXYNdVvuLfJXoFNMvUMoVvP5UJa/go-context/frac"
|
ctxfrac "github.com/jbenet/go-context/frac"
|
||||||
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MaxRecordAge specifies the maximum time that any node will hold onto a record
|
// MaxRecordAge specifies the maximum time that any node will hold onto a record
|
||||||
|
@ -15,10 +15,10 @@ import (
|
|||||||
record "github.com/ipfs/go-ipfs/routing/record"
|
record "github.com/ipfs/go-ipfs/routing/record"
|
||||||
pset "github.com/ipfs/go-ipfs/thirdparty/peerset"
|
pset "github.com/ipfs/go-ipfs/thirdparty/peerset"
|
||||||
|
|
||||||
pstore "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore"
|
peer "github.com/ipfs/go-libp2p-peer"
|
||||||
peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer"
|
pstore "github.com/ipfs/go-libp2p-peerstore"
|
||||||
inet "gx/ipfs/QmVCe3SNMjkcPgnpFhZs719dheq6xE7gJwjzV7aWcUM4Ms/go-libp2p/p2p/net"
|
inet "github.com/ipfs/go-libp2p/p2p/net"
|
||||||
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
|
context "golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// asyncQueryBuffer is the size of buffered channels in async queries. This
|
// asyncQueryBuffer is the size of buffered channels in async queries. This
|
||||||
|
Loading…
x
Reference in New Issue
Block a user