feat: expose pool information
[poolifier.git] / src / pools / cluster / dynamic.ts
index 67020577d2be51aaedce5fb37015a0e3edddca91..d4f270a373bc4e0c79198edf7538cb55a62f5e9d 100644 (file)
@@ -1,6 +1,5 @@
-import { PoolType } from '../pool'
-import type { ClusterPoolOptions } from './fixed'
-import { FixedClusterPool } from './fixed'
+import { type PoolType, PoolTypes } from '../pool'
+import { type ClusterPoolOptions, FixedClusterPool } from './fixed'
 
 /**
  * A cluster pool with a dynamic number of workers, but a guaranteed minimum number of workers.
@@ -36,11 +35,11 @@ export class DynamicClusterPool<
 
   /** @inheritDoc */
   public get type (): PoolType {
-    return PoolType.DYNAMIC
+    return PoolTypes.dynamic
   }
 
   /** @inheritDoc */
-  public get size (): number {
+  protected get maxSize (): number {
     return this.max
   }