import type { LogContext } from '@rocicorp/logger';
import type { IncomingMessage } from 'node:http';
import type { ZeroConfig } from '../../config/zero-config.ts';
import { type Worker } from '../../types/processes.ts';
import { type ShardID } from '../../types/shards.ts';
import { type Source } from '../../types/streams.ts';
import { HttpService } from '../http-service.ts';
import type { Service } from '../service.ts';
import type { BackupMonitor } from './backup-monitor.ts';
import { type ChangeStreamer, type Downstream, type SubscriberContext } from './change-streamer.ts';
import { type SnapshotMessage } from './snapshot.ts';
type Options = {
    port: number;
    startupDelayMs: number;
};
export declare class ChangeStreamerHttpServer extends HttpService {
    #private;
    readonly id = "change-streamer-http-server";
    constructor(lc: LogContext, config: ZeroConfig, opts: Options, parent: Worker, changeStreamer: ChangeStreamer & Service, backupMonitor: BackupMonitor | null);
    protected _onStart(): void;
    protected _onStop(): Promise<void>;
}
export declare class ChangeStreamerHttpClient implements ChangeStreamer {
    #private;
    constructor(lc: LogContext, shardID: ShardID, changeDB: string, changeStreamerURI: string | undefined);
    reserveSnapshot(taskID: string): Promise<Source<SnapshotMessage>>;
    subscribe(ctx: SubscriberContext): Promise<Source<Downstream>>;
}
type RequestHeaders = Pick<IncomingMessage, 'url' | 'headers'>;
export declare function getSubscriberContext(req: RequestHeaders): SubscriberContext;
export {};
//# sourceMappingURL=change-streamer-http.d.ts.map