import { EntityDict, OpRecord } from 'oak-domain/lib/types'; import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain'; import { Cache } from './cache'; import { Message } from './message'; import { Feature } from '../types/Feature'; type SubscribeEvent = 'connect' | 'disconnect'; type Callback = (event: string, records: OpRecord[]) => void; export declare class SubScriber extends Feature { private cache; private message; private getSubscribePointFn; private eventMap; private url?; private path?; private socket?; private halted; private reconnectInterval; private reconnectTimer; private count; private socketState; private eventCallbackMap; constructor(cache: Cache, message: Message, getSubscribePointFn: () => Promise<{ url: string; path: string; }>); on(event: SubscribeEvent, callback: (...data: any) => void): void; off(event: SubscribeEvent, callback: () => void): void; private emit; private initSocketPoint; private connect; sub(events: string[], callback?: Callback): Promise<() => void>; private unsub; getSubscriberId(): string | undefined; setHalted(halted: boolean): void; } export {};