X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fselection-strategies-types.ts;h=e53f3e822967b43a7d6f11ca0b34e6e3a9e7ed4e;hb=85003dff831b309b12d624215a8d67634af82b50;hp=9f68c22f892c50a3e424b59a3cb0cffe9f61557f;hpb=eb7bf7441d410ca5d9ff9bb08f191ef22399371c;p=poolifier.git diff --git a/src/pools/selection-strategies/selection-strategies-types.ts b/src/pools/selection-strategies/selection-strategies-types.ts index 9f68c22f..e53f3e82 100644 --- a/src/pools/selection-strategies/selection-strategies-types.ts +++ b/src/pools/selection-strategies/selection-strategies-types.ts @@ -154,6 +154,8 @@ export interface StrategyPolicy { /** * 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 }