Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const amqp = require('amqplib');
const fs = require('fs');
const AmqpConnection = require('amqplib/lib/callback_model').CallbackModel;
const monad = require('./iomonad');
const log = require('../log')('rabbot.connection');
const info = require('../info');
const url = require('url');
const crypto = require('crypto');
const os = require('os');
/* log
* `rabbot.amqp-connection`
* `debug`
* when amqplib's `connection.close` promise is rejected
* `info`
* connection attempt
* connection success
* connection failure
* no reachable endpoints