UNPKG

435 BTypeScriptView Raw
1/// <reference types="node" />
2import { Serializer } from '../interfaces/serializer.interface';
3export interface KafkaRequest<T = any> {
4 key: Buffer | string | null;
5 value: T;
6 headers: Record<string, any>;
7}
8/**
9 * @publicApi
10 */
11export declare class KafkaRequestSerializer implements Serializer<any, KafkaRequest | Promise<KafkaRequest>> {
12 serialize(value: any): any;
13 encode(value: any): Buffer | string | null;
14}