import { TypedKV } from "./typed-kv.js"; import type { KV2Options, EntriesIterable, KVEntry, KVGetResult, KVLike, KVSetResult, KeysIterable, SetOptions } from "./types.js"; export declare class KV2 implements KVLike { private prefix; private blobStore; private cache; private largeValueThreshold; private tracer; constructor(options?: KV2Options); private getFullPath; private getListPrefix; private stripPrefix; private readBlob; /** * Reads blob header without buffering the entire payload. * For binary format (large values), returns a reader positioned at the payload. * For pure JSON format (small values), returns the complete buffer. */ private readBlobStreaming; private readBlobWithConsistencyCheck; /** * Streaming version of readBlobWithConsistencyCheck. * Returns header and a reader for the payload without buffering. */ private readBlobStreamingWithConsistencyCheck; private sleep; private serializeValue; private deserializeValue; get(key: string): Promise>; /** * Creates a result from a fully-buffered blob (pure JSON format or cached). */ private createResultFromBuffer; /** * Creates a result with true streaming for binary format (large values). * The payload is streamed directly from the blob store without buffering. */ private createStreamingResult; private resolveValue; private getPayloadBytes; set(key: string, value: V | ReadableStream, ...[metadata, options]: undefined extends M ? [M?, SetOptions?] : [M, SetOptions?]): Promise; private concatStreams; delete(key: string): Promise; keys(prefix?: string): KeysIterable; /** * Fetch multiple keys concurrently with bounded concurrency. * Returns a Map of key -> entry for all existing keys. * * @param keys - Array of keys to fetch * @param concurrency - Number of concurrent get operations (default: 10) */ getMany(keys: string[], concurrency?: number): Promise>>; /** * Iterate over key-value entries with concurrent fetching. * Yields [key, entry] pairs as soon as each fetch completes. * * @param prefix - Optional prefix to filter keys * @param concurrency - Number of concurrent get operations (default: 20) */ entries(prefix?: string, concurrency?: number): EntriesIterable; getStore(subPrefix: string, indexes?: Record>): TypedKV; } //# sourceMappingURL=cached-kv.d.ts.map