UNPKG

frolyk

Version:

Stream processing library for Kafka in Node

31 lines (30 loc) 970 B
import { OffsetAndMetadata } from './index'; import { LogicalOffset, LogicalLiteralOffset } from '../offsets'; import { Message } from '../streams'; export interface AssignmentTestInterface { inject(payload: InjectMessagePayload): Message; inject(payload: Error): Error; committedOffsets: OffsetAndMetadata[]; initialMessages: Message[]; caughtUp(): Promise<void>; end(): Promise<void>; processing: Promise<void>; processingResults: any[]; processedOffsets: string[]; producedMessages: any[]; } interface InjectMessagePayload { topic?: string; partition?: number; value?: any; key?: any; offset?: string; timestamp?: string; } declare const createContext: ({ assignment, processors, offsetReset, initialState }: { assignment: any; processors: any; offsetReset?: LogicalLiteralOffset | LogicalOffset; initialState?: any; }) => Promise<AssignmentTestInterface>; export default createContext;