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.

10 lines (9 loc) 392 B
import { Decoder } from './decoder'; import { Encoder } from './encoder'; export type Api<Request, Response> = { apiKey: number; apiVersion: number; request: (encoder: Encoder, body: Request) => Encoder; response: (buffer: Decoder) => Promise<Response> | Response; }; export declare const createApi: <Request, Response>(api: Api<Request, Response>) => Api<Request, Response>;