import type { LogContext } from '@rocicorp/logger';
import type { BackfillCompleted, BackfillRequest, MessageBackfill } from '../protocol/current.ts';
import type { Replica } from './schema/shard.ts';
type StreamOptions = {
    /**
     * The number of bytes at which to flush a batch of rows in a
     * backfill message. Defaults to Node's getDefaultHighWatermark().
     */
    flushThresholdBytes?: number;
};
/**
 * Streams a series of `backfill` messages (ending with `backfill-complete`)
 * at a set watermark (i.e. LSN). The data is retrieved via a COPY stream
 * made at a transaction snapshot corresponding to specific LSN, obtained by
 * creating a short-lived replication slot.
 */
export declare function streamBackfill(lc: LogContext, upstreamURI: string, { slot, publications }: Pick<Replica, 'slot' | 'publications'>, bf: BackfillRequest, opts?: StreamOptions): AsyncGenerator<MessageBackfill | BackfillCompleted>;
export {};
//# sourceMappingURL=backfill-stream.d.ts.map