Encapsulate logic of cluster and thread worker/pool (#116)
[poolifier.git] / src / index.ts
index 95ef8255d659c39e545044e05a749db6f201dad4..7242dd5e1fbe4c36bbbbd00f17bc3af7cc2c756d 100644 (file)
@@ -1,26 +1,18 @@
-import { DynamicClusterPool } from './pools/cluster/dynamic'
-import { FixedClusterPool } from './pools/cluster/fixed'
-import { DynamicThreadPool } from './pools/thread/dynamic'
-import { FixedThreadPool } from './pools/thread/fixed'
-import { ClusterWorker } from './worker/cluster-worker'
-import { ThreadWorker } from './worker/thread-worker'
-
-export type { DynamicClusterPoolOptions } from './pools/cluster/dynamic'
 export type {
-  FixedClusterPoolOptions,
-  WorkerWithMessageChannel as ClusterWorkerWithMessageChannel
-} from './pools/cluster/fixed'
-export type { DynamicThreadPoolOptions } from './pools/thread/dynamic'
-export type {
-  FixedThreadPoolOptions,
-  WorkerWithMessageChannel as ThreadWorkerWithMessageChannel
-} from './pools/thread/fixed'
+  ErrorHandler,
+  ExitHandler,
+  IWorker,
+  OnlineHandler,
+  PoolOptions
+} from './pools/abstract-pool'
+export { DynamicClusterPool } from './pools/cluster/dynamic'
+export { FixedClusterPool } from './pools/cluster/fixed'
+export type { ClusterPoolOptions } from './pools/cluster/fixed'
+export type { IPool } from './pools/pool'
+export { DynamicThreadPool } from './pools/thread/dynamic'
+export { FixedThreadPool } from './pools/thread/fixed'
+export type { ThreadWorkerWithMessageChannel } from './pools/thread/fixed'
+export { AbstractWorker } from './worker/abstract-worker'
+export { ClusterWorker } from './worker/cluster-worker'
+export { ThreadWorker } from './worker/thread-worker'
 export type { WorkerOptions } from './worker/worker-options'
-export {
-  FixedThreadPool,
-  FixedClusterPool,
-  DynamicClusterPool,
-  DynamicThreadPool,
-  ThreadWorker,
-  ClusterWorker
-}