X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fselection-strategies-types.ts;h=f9a504351a4bbbe9d33bddc145c457a7ce27ef78;hb=a20f0ba5aa9c6946254aa197286ad9b70b6a0319;hp=23dc5e8c9a4e744ed605beeaaca1b38b4e2d944d;hpb=1b0aa06b3ab5cf8ae8bd135087143165889901cc;p=poolifier.git diff --git a/src/pools/selection-strategies/selection-strategies-types.ts b/src/pools/selection-strategies/selection-strategies-types.ts index 23dc5e8c..f9a50435 100644 --- a/src/pools/selection-strategies/selection-strategies-types.ts +++ b/src/pools/selection-strategies/selection-strategies-types.ts @@ -41,10 +41,21 @@ export interface WorkerChoiceStrategyOptions { /** * Pool worker tasks usage statistics requirements. + * + * @internal */ export interface RequiredStatistics { + /** + * Require tasks run time. + */ runTime: boolean + /** + * Require tasks average run time. + */ avgRunTime: boolean + /** + * Require tasks median run time. + */ medRunTime: boolean } @@ -70,4 +81,10 @@ export interface IWorkerChoiceStrategy { * @param workerNodeKey - The worker node key. */ remove: (workerNodeKey: number) => boolean + /** + * Sets the worker choice strategy options. + * + * @param opts - The worker choice strategy options. + */ + setOptions: (opts: WorkerChoiceStrategyOptions) => void }