UNPKG

phecda-server

Version:

server framework that provide IOC/type-reuse/http&rpc-adaptor

20 lines (17 loc) 754 B
import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq'; import { F as Factory } from '../../core-B5yKYkMJ.mjs'; import { R as RpcCtx, a as RpcServerOptions } from '../../types-7-m2wEkP.mjs'; import 'phecda-core'; import '../../meta-C_eDyXnK.mjs'; interface BullmqCtx extends RpcCtx { type: 'bullmq'; } type BullmqOptions = Omit<RpcServerOptions, 'globalAddons'> & { workerOpts?: WorkerOptions; queueOpts?: QueueOptions; }; declare function create({ moduleMap, meta }: Awaited<ReturnType<typeof Factory>>, opts?: BullmqOptions): Promise<{ workerMap: Record<string, Worker<any, any, string>>; queueMap: Record<string, Queue<any, any, string, any, any, string>>; }>; export { type BullmqCtx, type BullmqOptions, create };