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.

29 lines (28 loc) 764 B
import { TcpSocketConnectOpts } from 'net'; import { TLSSocketOptions } from 'tls'; import { SendRequest } from './connection'; export type SASLProvider = { mechanism: string; authenticate: (context: { sendRequest: SendRequest; }) => Promise<void>; }; type BrokerOptions = { clientId: string | null; options: TcpSocketConnectOpts; sasl: SASLProvider | null; ssl: TLSSocketOptions | null; requestTimeout: number; }; export declare class Broker { private options; private connection; sendRequest: SendRequest; constructor(options: BrokerOptions); connect(): Promise<this>; disconnect(): Promise<void>; private fetchApiVersions; private saslHandshake; private saslAuthenticate; } export {};