UNPKG

pipeproc

Version:

Multi-process log processing for nodejs

25 lines (24 loc) 1.01 kB
import { LevelDown as LevelDOWN, Bytes } from "leveldown"; import { IProc } from "./proc"; import { IWorker } from "./workerManager"; export interface ISystemProc { [index: string]: string | string[] | true | Bytes | undefined; name: string; topic: string; inlineProcessor?: string; externalProcessor?: string; to: string | string[]; } export declare function systemProc(db: LevelDOWN, activeProcs: IProc[], activeSystemProcs: ISystemProc[], activeWorkers: IWorker[], options: { name: string; offset: string; count: number; maxReclaims: number; reclaimTimeout: number; onMaxReclaimsReached: string; from: string | string[]; to: string | string[]; inlineProcessor?: string; externalProcessor?: string; }, callback: (err?: Error | null, myProc?: IProc | IProc[]) => void): void; export declare function validateProcs(name: string, from: string | string[], activeProcs: IProc[], callback: (err?: Error | null, myProc?: IProc | IProc[]) => void): void;