1 | import { EventObject } from '../types';
|
2 | declare type EventsBufferConfig = {
|
3 | bufferSize: number;
|
4 | flushSize: number;
|
5 | flushInterval: number;
|
6 | resendLimit: number;
|
7 | };
|
8 | export default class EventsBuffer {
|
9 | private _config;
|
10 | private _client;
|
11 | private _interval;
|
12 | private _buffer;
|
13 | private _pause;
|
14 | private _flush;
|
15 | constructor(client: any, config: EventsBufferConfig);
|
16 | push(event: EventObject): any;
|
17 | pause(): void;
|
18 | resume(): void;
|
19 | updateClient(client: any): void;
|
20 | flush(): void;
|
21 | private _startLoop;
|
22 | private _sendBatch;
|
23 | private _putEvents;
|
24 | private _generateBatchEventParams;
|
25 | private _handlePutEventsFailure;
|
26 | private _processPutEventsSuccessResponse;
|
27 | private _retry;
|
28 | private _bufferToMap;
|
29 | }
|
30 | export {};
|