X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fselection-strategies-types.ts;h=59b6a84f90e29dbd05a08dec2020428b7e2fe436;hb=26ce26ca8861318068427cc86697103e7a3ddbf4;hp=5d490638ad2dbb9348cad7318b2258b83cbdad95;hpb=549ee69bac912c53333c5818353fa78c94f00220;p=poolifier.git diff --git a/src/pools/selection-strategies/selection-strategies-types.ts b/src/pools/selection-strategies/selection-strategies-types.ts index 5d490638..59b6a84f 100644 --- a/src/pools/selection-strategies/selection-strategies-types.ts +++ b/src/pools/selection-strategies/selection-strategies-types.ts @@ -67,12 +67,6 @@ export interface MeasurementOptions { * Worker choice strategy options. */ export interface WorkerChoiceStrategyOptions { - /** - * Number of worker choice retries to perform if no worker is eligible. - * - * @defaultValue 6 - */ - readonly retries?: number /** * Measurement to use in worker choice strategy supporting it. */ @@ -104,6 +98,21 @@ export interface WorkerChoiceStrategyOptions { readonly weights?: Record } +/** + * Worker choice strategy internal options. + * + * @internal + */ +export interface InternalWorkerChoiceStrategyOptions + extends WorkerChoiceStrategyOptions { + /** + * Number of worker choice retries to perform if no worker is eligible. + * + * @defaultValue pool maximum size + */ + readonly retries?: number +} + /** * Measurement statistics requirements. * @@ -208,4 +217,10 @@ export interface IWorkerChoiceStrategy { * @param opts - The worker choice strategy options. */ readonly setOptions: (opts: WorkerChoiceStrategyOptions) => void + /** + * Whether the pool has worker nodes ready or not. + * + * @returns Whether the pool has worker nodes ready or not. + */ + readonly hasPoolWorkerNodesReady: () => boolean }