X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Findex.ts;h=367c205c977582f14ea68b4f8d8776eff373581f;hb=25f5b5de1c522d29f7a16597245a2f7c9434b124;hp=1d7e0b1fcfc5be98992f2cc5113a00b84ed6db12;hpb=60fbd6d6188b0902d157fd0cde04d6af3a391e32;p=poolifier.git diff --git a/src/index.ts b/src/index.ts index 1d7e0b1f..367c205c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,12 +1,67 @@ -import { DynamicThreadPool } from './dynamic' -import { FixedThreadPool } from './fixed' -import { ThreadWorker } from './workers' - +export type { AbstractPool } from './pools/abstract-pool' +export { DynamicClusterPool } from './pools/cluster/dynamic' export { - Draft, - FixedThreadPoolOptions, - WorkerWithMessageChannel -} from './fixed' -export { DynamicThreadPoolOptions } from './dynamic' -export { ThreadWorkerOptions } from './workers' -export { FixedThreadPool, DynamicThreadPool, ThreadWorker } + FixedClusterPool, + type ClusterPoolOptions +} from './pools/cluster/fixed' +export { PoolEvents, PoolTypes, WorkerTypes } from './pools/pool' +export type { + IPool, + PoolEmitter, + PoolEvent, + PoolInfo, + PoolOptions, + PoolType, + TasksQueueOptions, + WorkerType +} from './pools/pool' +export type { + ErrorHandler, + EventLoopUtilizationMeasurementStatistics, + ExitHandler, + IWorker, + MeasurementStatistics, + MessageHandler, + OnlineHandler, + Task, + TaskStatistics, + WorkerNode, + WorkerUsage +} from './pools/worker' +export { + Measurements, + WorkerChoiceStrategies +} from './pools/selection-strategies/selection-strategies-types' +export type { + IWorkerChoiceStrategy, + Measurement, + MeasurementOptions, + MeasurementStatisticsRequirements, + StrategyPolicy, + TaskStatisticsRequirements, + WorkerChoiceStrategy, + WorkerChoiceStrategyOptions +} from './pools/selection-strategies/selection-strategies-types' +export type { WorkerChoiceStrategyContext } from './pools/selection-strategies/worker-choice-strategy-context' +export { DynamicThreadPool } from './pools/thread/dynamic' +export { FixedThreadPool, type ThreadPoolOptions } from './pools/thread/fixed' +export type { AbstractWorker } from './worker/abstract-worker' +export { ClusterWorker } from './worker/cluster-worker' +export { ThreadWorker } from './worker/thread-worker' +export { KillBehaviors } from './worker/worker-options' +export type { KillBehavior, WorkerOptions } from './worker/worker-options' +export type { + TaskFunctions, + WorkerAsyncFunction, + WorkerFunction, + WorkerSyncFunction +} from './worker/worker-functions' +export type { + MessageValue, + PromiseResponseWrapper, + TaskError, + TaskPerformance, + WorkerStatistics +} from './utility-types' +export type { CircularArray } from './circular-array' +export type { Queue } from './queue'