X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Findex.ts;h=b0c419ca89e4f6d1838ffe93368d26e3d292d77c;hb=6db75ad932064c1415ff6f03645929530209a5fe;hp=a5fe1519d711c43ec97cf5120a2af92cb40babe7;hpb=f045358da15636a5e2eb4be0a1bf3f0664651ce3;p=poolifier.git diff --git a/src/index.ts b/src/index.ts index a5fe1519..b0c419ca 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,20 @@ -import DynamicThreadPool from './dynamic' -import FixedThreadPool from './fixed' -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, 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, + IPoolWorker, + 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 { 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'