docs: fix README.md
[poolifier.git] / src / pools / selection-strategies / selection-strategies-types.ts
index 9f68c22f892c50a3e424b59a3cb0cffe9f61557f..563b04b00086a7a31a68f7cb25ca4bde6b513c92 100644 (file)
@@ -147,13 +147,15 @@ export interface TaskStatisticsRequirements {
  */
 export interface StrategyPolicy {
   /**
-   * Expects direct usage of dynamic worker.
+   * Expects direct usage of the newly created dynamic worker.
    */
   readonly useDynamicWorker: boolean
 }
 
 /**
  * Worker choice strategy interface.
+ *
+ * @internal
  */
 export interface IWorkerChoiceStrategy {
   /**
@@ -169,30 +171,30 @@ export interface IWorkerChoiceStrategy {
    *
    * @returns `true` if the reset is successful, `false` otherwise.
    */
-  reset: () => boolean
+  readonly reset: () => boolean
   /**
    * Updates the worker node key strategy internals.
    *
    * @returns `true` if the update is successful, `false` otherwise.
    */
-  update: (workerNodeKey: number) => boolean
+  readonly update: (workerNodeKey: number) => boolean
   /**
    * Chooses a worker node in the pool and returns its key.
    *
    * @returns The worker node key.
    */
-  choose: () => number
+  readonly choose: () => number
   /**
    * 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.
    */
-  remove: (workerNodeKey: number) => boolean
+  readonly remove: (workerNodeKey: number) => boolean
   /**
    * Sets the worker choice strategy options.
    *
    * @param opts - The worker choice strategy options.
    */
-  setOptions: (opts: WorkerChoiceStrategyOptions) => void
+  readonly setOptions: (opts: WorkerChoiceStrategyOptions) => void
 }