-
Notifications
You must be signed in to change notification settings - Fork 1
/
constants.js
38 lines (34 loc) · 878 Bytes
/
constants.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module.exports.PACKET_TYPE = {
SEARCH_REQ:"search_req",
SEARCH_RES:"search_res",
PROXIMITY_LINKS: "proximity_links"
};
module.exports.PACKET_FIELD = {
DATE_TIME: "date_time",
PACKET_TYPE: "packet_type",
PACKET_ID: "packet_id",
REQUEST_ID: "request_id",
PACKET_SOURCE: "packet_source",
QUERY: "query",
HOPS: "hops",
BODY:"body",
LIST: "list",
POINTERS: "pointers",
ENTRY: ""
};
module.exports.EVENTS = {
SEARCH_START: 'start',
SEARCH_RELAY: 'relay',
SEARCH_DISCARDED: 'discard',
SEARCH_REVISITED: 'revisit',
SEARCH_RESPOND: 'respond',
PROX_LINK_CHANGED: 'prox_change',
NODE_STATS: 'node_stats',
ENC_INTERVAL: 'enc_interval'
};
module.exports.STATS_RECORDER = {
HTTP: "http",
FILE: "file",
};
module.exports.STATS_FILE_PATH = './stats.txt';
module.exports.STATS_HTTP_URL = "http://localhost:3500/stats";