MCPcopy
hub / github.com/Unitech/pm2 / constructor

Method constructor

modules/pm2-io-agent/src/InteractorDaemon.js:23–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22const 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

Callers

nothing calls this directly

Calls 4

retrieveConfMethod · 0.95
_internalDebuggerMethod · 0.95
bindMethod · 0.65
onMethod · 0.65

Tested by

no test coverage detected