iampool
v0.1.4
Published
[![NPM Stable Version][npm-stable-version-image]][npm-url] [![Build Status][travis-master-image]][travis-url] [![Test Coverage][codecov-image]][codecov-url-master] [![Dependency Status][david-image]][david-url-master] [![Node.js Version][node-version-imag
Downloads
1
Readme
iampool
Install
npm i iampool
Usage
const pool = new Pool({
acquire(cb) {
// connection.createChannel(cb);
},
dispose(channel, cb) {
// channel.close(cb);
},
max: 10,
maxWaitingClients: 50,
acquireTimeoutMs: 10000,
});
pool.acquire((err, channel) => {
// ...
pool.release(channel);
});