1 | import { Handler } from "../handler";
|
2 |
|
3 | export type SelfManagedKafkaHandler = Handler<SelfManagedKafkaEvent, void>;
|
4 |
|
5 | export interface SelfManagedKafkaRecordHeader {
|
6 | [headerKey: string]: number[];
|
7 | }
|
8 |
|
9 | export interface SelfManagedKafkaRecord {
|
10 | topic: string;
|
11 | partition: number;
|
12 | offset: number;
|
13 | timestamp: number;
|
14 | timestampType: "CREATE_TIME" | "LOG_APPEND_TIME";
|
15 | key: string;
|
16 | value: string;
|
17 | headers: SelfManagedKafkaRecordHeader[];
|
18 | }
|
19 |
|
20 |
|
21 | export interface SelfManagedKafkaEvent {
|
22 | eventSource: "SelfManagedKafka";
|
23 | bootstrapServers: string;
|
24 | records: {
|
25 | [topic: string]: SelfManagedKafkaRecord[];
|
26 | };
|
27 | }
|