UNPKG

pipeproc

Version:

Multi-process log processing for nodejs

27 lines (26 loc) 818 B
import { IPipeProcClient, ICommitLog } from "."; import { IProc } from "../node/proc"; declare type ChangesCb = (this: ILiveProc, err: null | Error, result: { id: string; body: object; } | { id: string; body: object; }[] | null, nextCb: () => void) => void | Promise<void>; export interface ILiveProc { changes: (cb: ChangesCb) => ILiveProc; inspect: () => Promise<IProc>; destroy: () => Promise<IProc>; disable: () => Promise<IProc>; resume: () => Promise<IProc>; reclaim: () => Promise<string>; ack: () => Promise<string>; ackCommit: (commitLog: ICommitLog) => void; cancel: () => Promise<void>; } export declare function createLiveProc(client: IPipeProcClient, options: { topic: string; mode: "live" | "all"; count?: number; }): ILiveProc; export {};