import { ReadResponse } from './types';
import { Cache } from './cache/cache';
import { AsyncDestructor } from '@synnaxlabs/x';
import { channel, Synnax } from '@synnaxlabs/client';
import { alamos } from '@synnaxlabs/alamos';

export type StreamHandler = (data: Record<channel.Key, ReadResponse>) => void;
interface StreamerProps {
    core: Synnax;
    cache: Cache;
    instrumentation?: alamos.Instrumentation;
}
export declare class Streamer {
    private readonly props;
    private readonly mu;
    private readonly listeners;
    private streamerRunLoop;
    private streamer;
    constructor(props: StreamerProps);
    /** Implements StreamClient. */
    stream(handler: StreamHandler, keys: channel.Keys): Promise<AsyncDestructor>;
    private removeStreamHandler;
    private updateStreamer;
    private runStreamer;
    close(): Promise<void>;
}
export {};
//# sourceMappingURL=streamer.d.ts.map