MCPcopy
hub / github.com/scality/cloudserver / start

Method start

managementAgent.js:32–52  ·  view source on GitHub ↗
(_cb)

Source from the content-addressed store, hash-verified

30 }
31
32 start(_cb) {
33 const cb = _cb || function noop() {};
34
35 /* Define REPORT_TOKEN env variable needed by the management
36 * module. */
37 process.env.REPORT_TOKEN = process.env.REPORT_TOKEN
38 || _config.reportToken
39 || Uuid.v4();
40
41 initManagement(logger.newRequestLogger(), overlay => {
42 let error = null;
43
44 if (overlay) {
45 this.loadedOverlay = overlay;
46 this.startServer();
47 } else {
48 error = new Error('failed to init management');
49 }
50 return cb(error);
51 });
52 }
53
54 stop() {
55 if (!this.wss) {

Callers 1

managementAgent.jsFile · 0.45

Calls 2

startServerMethod · 0.95
initManagementFunction · 0.85

Tested by

no test coverage detected