Commit b3510b3e7391e83ce0af362118d324147a9d2903
1 parent
eaada21c35
Exists in
master
heartbeat2
Showing 1 changed file with 32 additions and 0 deletions Side-by-side Diff
heartbeat2/index.js
... | ... | @@ -0,0 +1,32 @@ |
1 | +"use strict"; | |
2 | + | |
3 | +/** | |
4 | + * heartbeat2, blm ready | |
5 | + */ | |
6 | + | |
7 | +const request = require('request'); | |
8 | + | |
9 | +const config = require('../config'); | |
10 | +const logger = require('../logger'); | |
11 | +const matrix = require('../matrix'); | |
12 | +const core_url = require('../core-url'); | |
13 | + | |
14 | +let module_type; | |
15 | + | |
16 | +function setModuleType(value) { | |
17 | + module_type = value; | |
18 | + send(); | |
19 | +} | |
20 | + | |
21 | + | |
22 | +function send() { | |
23 | + const data = { | |
24 | + name: config.handler_name || config.origin, | |
25 | + module_type: module_type, | |
26 | + products: config.products, | |
27 | + remote_products: config.remote_products | |
28 | + } | |
29 | +} | |
30 | + | |
31 | +exports.setModuleType = setModuleType; | |
32 | +exports.send = send; |