X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fhttp-server-pool%2Ffastify-hybrid%2Fsrc%2Ftypes.ts;h=137f4a98e22aa076085ae405455f1c4b28f82327;hb=6d05a26bd9cfc3319abf1929fc311a97bdaf97d3;hp=cdd67845060143ae31add0915abc671075ee6da6;hpb=3b3115396965edad0cf3fefc4f9081977310da34;p=poolifier.git diff --git a/examples/typescript/http-server-pool/fastify-hybrid/src/types.ts b/examples/typescript/http-server-pool/fastify-hybrid/src/types.ts index cdd67845..137f4a98 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/src/types.ts +++ b/examples/typescript/http-server-pool/fastify-hybrid/src/types.ts @@ -1,6 +1,7 @@ -import type { ThreadPoolOptions } from 'poolifier' +import type { Worker } from 'node:worker_threads' +import type { PoolOptions } from 'poolifier' -export interface ClusterWorkerData { +export interface ClusterWorkerData extends FastifyPoolifierOptions { port: number } @@ -9,20 +10,20 @@ export interface ClusterWorkerResponse { port?: number } -export interface BodyPayload { +export interface DataPayload { number?: number } export interface ThreadWorkerData { - body: T + data: T } export interface ThreadWorkerResponse { - body: T + data: T } -export interface FastifyPoolifierOptions extends ThreadPoolOptions { +export interface FastifyPoolifierOptions extends PoolOptions { workerFile: string - maxWorkers?: number minWorkers?: number + maxWorkers?: number }