X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Findex.ts;h=92ed93a11cf52c2fe27a8ca034a58c46d0755ca0;hb=a454d5734637350c42e101c8027215b7dc0f240d;hp=c24d447dd015b93fbb970da9d4db8c260b28b0c0;hpb=4ade5f1f37bee847b9cd2bac3c4d7a9903d62a01;p=poolifier.git diff --git a/src/index.ts b/src/index.ts index c24d447d..92ed93a1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,19 @@ -import FixedThreadPool from './fixed' -import DynamicThreadPool from './dynamic' -import { ThreadWorker } from './workers' - +export { DynamicClusterPool } from './pools/cluster/dynamic' +export { FixedClusterPool } from './pools/cluster/fixed' +export type { ClusterPoolOptions } from './pools/cluster/fixed' +export type { IPool, PoolEmitter, PoolOptions } from './pools/pool' export type { - Draft, - FixedThreadPoolOptions, - WorkerWithMessageChannel -} from './fixed' -export type { DynamicThreadPoolOptions } from './dynamic' -export type { ThreadWorkerOptions } from './workers' -export { FixedThreadPool, DynamicThreadPool, ThreadWorker } - -module.exports = { FixedThreadPool, DynamicThreadPool, ThreadWorker } + ErrorHandler, + ExitHandler, + MessageHandler, + OnlineHandler +} from './pools/pool-worker' +export { WorkerChoiceStrategies } from './pools/selection-strategies/selection-strategies-types' +export type { WorkerChoiceStrategy } from './pools/selection-strategies/selection-strategies-types' +export { DynamicThreadPool } from './pools/thread/dynamic' +export { FixedThreadPool } from './pools/thread/fixed' +export type { ThreadWorkerWithMessageChannel } from './pools/thread/fixed' +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'