arnaucube ff0ba3995a | 5 years ago | |
---|---|---|
cmd | 5 years ago | |
config | 5 years ago | |
kademlia | 5 years ago | |
node | 5 years ago | |
rpc-test | 5 years ago | |
.gitignore | 5 years ago | |
.travis.yml | 5 years ago | |
LICENSE | 5 years ago | |
README.md | 5 years ago | |
config.test0.yaml | 5 years ago | |
config.test1.yaml | 5 years ago | |
config.test2.yaml | 5 years ago | |
config.test3.yaml | 5 years ago | |
go.mod | 5 years ago | |
go.sum | 5 years ago | |
main.go | 5 years ago | |
run-dev-nodes.sh | 5 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