How to run queries - gtfierro/pundat GitHub Wiki
Query requests are sent to <base URI>/query
and have the structure
type KeyValueQuery struct {
Query string
Nonce uint32
}
with PID 2.0.8.1 (GilesKeyValueQueryPID). Query
contains the Giles query, and Nonce
is a number unique to your VK to help distinguish between query responses.
Results of the query, for a query originating from a VK 3FSemV99-mKc0PSZ-bM_QNOiU0mbVYUuqwWpiQ38e2k=
, will be published on <base URI>/3FSemV99-mKc0PSZ-bM_QNOiU0mbVYUuqwWpiQ38e2k,queries
. Note that the trailing =
has been removed from the VK.
pundat
comes bundled with a simple interactive query tool as well as a scanner for finding instances of
archivers.
To scan,
$ pundat scan gabe.pantry
1475093317912881408 [Info] Connected to BOSSWAVE router version 2.4.15 'Hadron'
Found Archiver at:
URI -> gabe.pantry
Last Alive -> 2016-09-16 10:41:40.818797445 -0700 PDT (290h26m57.097961096s ago)
Found Archiver at:
URI -> gabe.pantry/archiver
Last Alive -> 2016-09-28 13:08:33.362724668 -0700 PDT (4.554333581s ago)
To query,
$ pundat query -a scratch.ns/archiver
1474916412047886356 [Info] Connected to BOSSWAVE router version 2.4.14 'Hadron'
INFO actions.go:105 Sep 28 13:07:03 ▶ Archiver at scratch.ns/archiver last alive at 2016-09-28 13:07:01.355946279 -0700 PDT (2.444193146s ago)
(pundat)>select *;
Subscribe to scratch.ns/archiver/s.giles/_/i.archiver/signal/3FSemV99-mKc0PSZ-bM_QNOiU0mbVYUuqwWpiQ38e2k,queries
Publish to scratch.ns/archiver/s.giles/_/i.archiver/slot/query
{
"UUID": "a8f316ff-c1cb-3eb7-ab94-ff439446f9a9",
"Path": "",
"Metadata": {
"Computer": "pantry.cs",
"SourceName": "top",
"UnitofMeasure": "MEM",
"lastalive": "2016-09-26 12:00:16.218735505 -0700 PDT"
}
}{
"UUID": "cb57bf2d-b0c8-3c74-979f-636f412ea2f7",
"Path": "",
"Metadata": {
"Computer": "pantry.cs",
"SourceName": "top",
"UnitofMeasure": "CPU",
"lastalive": "2016-09-26 12:00:16.218735505 -0700 PDT"
}
}