-
Receive queries from clients and returns a list of available nodes.
-
Receive “hello” message from other clients which want to introduce themselves to the Seeder. The seeder will add such clients to the peer list.
-
Frequently ping existing nodes in the database to update their information (e.g. check whether they are alive, which clients they are using).
-
Support queries like: which nodes are alive during the last 1 hours, 2 hours, 1 day.
make test
make run-seeder
OR
make local-seeder
make run-client PORT=27001
OR
make local-client PORT=27001
curl -X GET 'http://localhost:5000/v1/nodes'
curl -X GET 'http://localhost:5000/v1/nodes?alive=true&age=30s'
curl -X POST 'http://localhost:5000/v1/nodes' -H 'Content-Type: application/json' -d '{"ip":"192.168.0.12:27002", "name":"testClientName2", "client":"testClient", "version":"v1.0.1"}
curl -X GET 'http://localhost:27001/ping'