arnaucube ff0ba3995a | 4 years ago | |
---|---|---|
cmd | 4 years ago | |
config | 4 years ago | |
kademlia | 4 years ago | |
node | 4 years ago | |
rpc-test | 4 years ago | |
.gitignore | 4 years ago | |
.travis.yml | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
config.test0.yaml | 4 years ago | |
config.test1.yaml | 4 years ago | |
config.test2.yaml | 4 years ago | |
config.test3.yaml | 4 years ago | |
go.mod | 4 years ago | |
go.sum | 4 years ago | |
main.go | 4 years ago | |
run-dev-nodes.sh | 4 years ago |
Kademlia DHT Go implementation.
Following the specification from
To run a node:
go run main.go --config config.test0.yaml --debug start
+--+ +--+
|n0+-----------+n1|
+-++ +--+
|
|
| +--+ +--+
+----+n2+-----------+n3|
+--+ +--+
bash run-dev-nodes.sh
Using the test.go
in the rpc-test
directory:
go run test.go -find
admin
call to Find
node, to the n0
, asking about the n3
go run test.go -ping
PING
callgo run test.go -findnode
FIND_NODE
callgo run test.go -findvalue
FIND_VALUE
callgo run test.go -store
STORE
call