refactor: use task performance data structure in messages
[poolifier.git] / src / index.ts
index dce003805d0ee3c7d44d499d33ce4454c188f8e0..1895d34877410bdca90ca30b60acf13c48db7299 100644 (file)
@@ -1,15 +1,19 @@
-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 { DynamicClusterPool } from './pools/cluster/dynamic'
+export {
+  FixedClusterPool,
+  type ClusterPoolOptions
+} from './pools/cluster/fixed'
+export { PoolEvents, PoolTypes, WorkerTypes } from './pools/pool'
 export type {
   IPool,
   PoolEmitter,
-  PoolOptions,
   PoolEvent,
+  PoolInfo,
+  PoolOptions,
   PoolType,
-  TasksQueueOptions
+  TasksQueueOptions,
+  WorkerType
 } from './pools/pool'
 export type {
   ErrorHandler,
@@ -24,22 +28,34 @@ export type {
 export { WorkerChoiceStrategies } from './pools/selection-strategies/selection-strategies-types'
 export type {
   IWorkerChoiceStrategy,
-  RequiredStatistics,
+  TaskStatistics,
   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 {
+  FixedThreadPool,
+  type ThreadPoolOptions,
+  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 {
+  TaskFunctions,
+  WorkerAsyncFunction,
+  WorkerFunction,
+  WorkerSyncFunction
+} from './worker/worker-functions'
 export type {
   Draft,
+  MessageValue,
   PromiseResponseWrapper,
-  MessageValue
+  TaskPerformance,
+  WorkerStatistics
 } from './utility-types'
 export type { CircularArray } from './circular-array'
+export type { Queue } from './queue'