import { EventEmitter } from "node:events"; import { Result } from "@openally/result"; import type { KeyType, DatabaseConnection } from "../types/index.js"; import type { KVType, RedisSetValueOptions, StringOrObject } from "./adapter/redis.adapter.js"; export interface KVOptions { adapter: DatabaseConnection; type?: KVType; prefix?: string; prefixSeparator?: string; } export type KVPeerSetValueOptions = Omit, "type">; /** * @class KVPeer * @extends EventEmitter * @description This class is used to store and retrieve key-value peers in Redis. * * @property {Redis} redis - Instance of Redis connection * * @example * ```ts * new KVPeer(); * ``` */ export declare class KVPeer extends EventEmitter { protected type: KVType; protected adapter: DatabaseConnection; protected prefix: string; protected prefixSeparator: string; constructor(options: KVOptions); setValue(options: KVPeerSetValueOptions): Promise>; getValue(key: KeyType): Promise; deleteValue(key: KeyType): Promise; protected keyWithPrefix(key: KeyType): string; } //# sourceMappingURL=KVPeer.class.d.ts.map