mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2024-11-23 00:49:42 +00:00
35 lines
552 B
JavaScript
35 lines
552 B
JavaScript
|
const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('./core/symbols')
|
||
|
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
|