chore: v2.4.10
[poolifier.git] / src / index.ts
index db6960b86af815b03e43460a3cfef9dfc591a3f8..d1482c8336aa0bfc755217ac015a58f2766af0e4 100644 (file)
@@ -1,14 +1,48 @@
-import DynamicThreadPool from './dynamic'
-import FixedThreadPool from './fixed'
-import { ThreadWorker } from './workers'
-
-export {
+export { DynamicClusterPool } from './pools/cluster/dynamic'
+export { FixedClusterPool } from './pools/cluster/fixed'
+export type { ClusterPoolOptions } from './pools/cluster/fixed'
+export type { AbstractPool } from './pools/abstract-pool'
+export { PoolEvents } from './pools/pool'
+export type {
+  IPool,
+  PoolEmitter,
+  PoolOptions,
+  PoolEvent,
+  PoolType,
+  TasksQueueOptions
+} from './pools/pool'
+export type {
+  ErrorHandler,
+  ExitHandler,
+  IWorker,
+  MessageHandler,
+  OnlineHandler,
+  Task,
+  TasksUsage,
+  WorkerNode
+} from './pools/worker'
+export { WorkerChoiceStrategies } from './pools/selection-strategies/selection-strategies-types'
+export type {
+  IWorkerChoiceStrategy,
+  RequiredStatistics,
+  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 } from './pools/thread/fixed'
+export type { ThreadWorkerWithMessageChannel } 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 {
   Draft,
-  FixedThreadPoolOptions,
-  WorkerWithMessageChannel
-} from './fixed'
-export { DynamicThreadPoolOptions } from './dynamic'
-export { ThreadWorkerOptions } from './workers'
-export { FixedThreadPool, DynamicThreadPool, ThreadWorker }
-
-module.exports = { FixedThreadPool, DynamicThreadPool, ThreadWorker }
+  PromiseResponseWrapper,
+  MessageValue,
+  WorkerAsyncFunction,
+  WorkerFunction,
+  WorkerSyncFunction
+} from './utility-types'
+export type { CircularArray } from './circular-array'