UNPKG

kafka-ts

Version:

**KafkaTS** is a Apache Kafka client library for Node.js. It provides both a low-level API for communicating directly with the Apache Kafka cluster and high-level APIs for publishing and subscribing to Kafka topics.

23 lines (22 loc) 651 B
/// <reference types="node" /> /// <reference types="node" /> import { EventEmitter } from 'stream'; import { FetchResponse } from '../api/fetch'; import { Assignment } from '../api/sync-group'; type FetcherOptions = { nodeId: number; assignment: Assignment; fetch: (nodeId: number, assignment: Assignment) => Promise<FetchResponse>; process: (response: FetchResponse) => Promise<void>; }; export declare class Fetcher extends EventEmitter<{ stopped: []; }> { private options; private isRunning; constructor(options: FetcherOptions); loop(): Promise<void>; private step; stop(): Promise<void>; } export {};