import * as IORedis from "ioredis"; import { IDriverAdaptor } from "../core"; export interface IRedisConf extends IORedis.RedisOptions { key_mutex_wait_threshold?: number; } export interface ITurtleRedis extends IORedis.Redis { dLock: (key: string | string[], lockerIdentity: string, lockTimeMS?: number, retry?: number) => Promise; dUnlock: (key: string | string[], lockerIdentity: string) => Promise<-1 | 0 | 1>; } export declare const getRedisKey: (...keys: string[]) => string; export declare class RedisDriver implements IDriverAdaptor { static readonly inst: ITurtleRedis; protected ioredis: IORedis.Redis; protected loadRedis(conf: IRedisConf): IORedis.Redis; init(conf: IRedisConf): Promise; }