1
0
Files

35 lines
553 B
JavaScript
Raw Permalink Normal View History

2024-09-13 17:15:41 +02:00
const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('../core/symbols')
2022-10-17 12:11:10 +02:00
const kPool = Symbol('pool')
class PoolStats {
constructor (pool) {
this[kPool] = pool
}
get connected () {
return this[kPool][kConnected]
}
get free () {
return this[kPool][kFree]
}
get pending () {
return this[kPool][kPending]
}
get queued () {
return this[kPool][kQueued]
}
get running () {
return this[kPool][kRunning]
}
get size () {
return this[kPool][kSize]
}
}
module.exports = PoolStats