MCPcopy Index your code
hub / github.com/scality/cloudserver / startPushConnectionHealthCheckServer

Function startPushConnectionHealthCheckServer

lib/management/push.js:278–294  ·  view source on GitHub ↗
(cb)

Source from the content-addressed store, hash-verified

276}
277
278function startPushConnectionHealthCheckServer(cb) {
279 const server = http.createServer((req, res) => {
280 if (req.url !== '/_/healthcheck') {
281 res.writeHead(404);
282 res.write('Not Found');
283 } else if (connected) {
284 res.writeHead(200);
285 res.write('Connected');
286 } else {
287 res.writeHead(503);
288 res.write('Not Connected');
289 }
290 res.end();
291 });
292
293 server.listen(_config.port, cb);
294}
295
296module.exports = {
297 createWSAgent,

Callers 2

metrics_server.jsFile · 0.85

Calls 2

writeMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected