docs: update benchmarks vs. external pools
[poolifier.git] / src / index.ts
index 1d7e0b1fcfc5be98992f2cc5113a00b84ed6db12..367c205c977582f14ea68b4f8d8776eff373581f 100644 (file)
@@ -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'