UNPKG

phecda-server

Version:

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

20 lines (17 loc) 625 B
import { Consumer, Producer } from 'kafkajs'; import { F as Factory } from '../../core-nqk9d66O.mjs'; import { R as RpcCtx, a as RpcServerOptions } from '../../types-f_hV_rCD.mjs'; import 'phecda-core'; import '../../meta-ZbvaS7xK.mjs'; interface KafkaCtx extends RpcCtx { type: 'kafka'; topic: string; partition: number; heartbeat(): Promise<void>; pause(): () => void; } declare function bind({ consumer, producer }: { consumer: Consumer; producer: Producer; }, { moduleMap, meta }: Awaited<ReturnType<typeof Factory>>, opts?: RpcServerOptions): Promise<void>; export { type KafkaCtx, bind };