mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
kafka-node: fix message value to be string or Buffer (#23201)
This commit is contained in:
Vendored
+13
-11
@@ -3,6 +3,8 @@
|
||||
// Definitions by: Daniel Imrie-Situnayake <https://github.com/dansitu>, Bill <https://github.com/bkim54>, Michael Haan <https://github.com/sfrooster>, Amiram Korach <https://github.com/amiram>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
// # Classes
|
||||
export class Client {
|
||||
constructor(connectionString: string, clientId?: string, options?: ZKOptions, noBatchOptions?: AckBatchOptions, sslOptions?: any);
|
||||
@@ -88,24 +90,24 @@ export class Offset {
|
||||
}
|
||||
|
||||
export class KeyedMessage {
|
||||
constructor(key: string, message: string);
|
||||
constructor(key: string, value: string | Buffer);
|
||||
}
|
||||
|
||||
// # Interfaces
|
||||
|
||||
export interface Message {
|
||||
topic: string;
|
||||
value: string;
|
||||
offset?: number;
|
||||
partition?: number;
|
||||
highWaterOffset?: number;
|
||||
key?: string;
|
||||
}
|
||||
topic: string;
|
||||
value: string | Buffer;
|
||||
offset?: number;
|
||||
partition?: number;
|
||||
highWaterOffset?: number;
|
||||
key?: string;
|
||||
}
|
||||
|
||||
export interface ProducerOptions {
|
||||
requireAcks?: number;
|
||||
ackTimeoutMs?: number;
|
||||
partitionerType?: number;
|
||||
requireAcks?: number;
|
||||
ackTimeoutMs?: number;
|
||||
partitionerType?: number;
|
||||
}
|
||||
|
||||
export interface KafkaClientOptions {
|
||||
|
||||
Reference in New Issue
Block a user