()
| 21 | |
| 22 | const InteractorDaemon = module.exports = class InteractorDaemon { |
| 23 | constructor () { |
| 24 | this.opts = this.retrieveConf() |
| 25 | |
| 26 | log(`MACHINE_NAME=${this.opts.MACHINE_NAME}`) |
| 27 | log(`PUBLIC_KEY=${this.opts.PUBLIC_KEY}`) |
| 28 | log(`ROOT_URL=${cst.KEYMETRICS_ROOT_URL}`) |
| 29 | |
| 30 | this.DAEMON_ACTIVE = false |
| 31 | this.transport = new TransporterInterface(this.opts, this) |
| 32 | .bind('websocket') |
| 33 | this.transport.on('error', (err) => { |
| 34 | return console.error('[NETWORK] Error : ' + err.message || err) |
| 35 | }) |
| 36 | this.httpClient = new Utility.HTTPClient() |
| 37 | this._online = true |
| 38 | |
| 39 | if (cst.IS_BUN === false) |
| 40 | this._internalDebugger() |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Use process.send() if connected |
nothing calls this directly
no test coverage detected