refactor: cleanup IWRR properties
[poolifier.git] / src / pools / selection-strategies / selection-strategies-types.ts
index 114ae8c555141fd08bff0103fcf79d62a65b5f83..6ae695ca6dca6141d48cef31dd46c6be5cb08bbb 100644 (file)
@@ -21,7 +21,13 @@ export const WorkerChoiceStrategies = Object.freeze({
   /**
    * Weighted round robin worker selection strategy.
    */
-  WEIGHTED_ROUND_ROBIN: 'WEIGHTED_ROUND_ROBIN'
+  WEIGHTED_ROUND_ROBIN: 'WEIGHTED_ROUND_ROBIN',
+  /**
+   * Interleaved weighted round robin worker selection strategy.
+   *
+   * @experimental
+   */
+  INTERLEAVED_WEIGHTED_ROUND_ROBIN: 'INTERLEAVED_WEIGHTED_ROUND_ROBIN'
 } as const)
 
 /**
@@ -83,7 +89,7 @@ export interface IWorkerChoiceStrategy {
    */
   reset: () => boolean
   /**
-   * Updates worker node strategy internals.
+   * Updates the worker node key strategy internals.
    *
    * @returns `true` if the update is successful, `false` otherwise.
    */
@@ -95,7 +101,7 @@ export interface IWorkerChoiceStrategy {
    */
   choose: () => number
   /**
-   * Removes a worker node key from strategy internals.
+   * Removes the worker node key from strategy internals.
    *
    * @param workerNodeKey - The worker node key.
    * @returns `true` if the worker node key is removed, `false` otherwise.