/**
 * redis模块
 * @date 2022-03
 * @author 何华东
 */
export declare type RedisClient = {
    get: Function;
    set: Function;
    del: Function;
    hget: Function;
    hset: Function;
    hgetall: Function;
    [cmd: string]: Function;
};
/**
 * redis客户端实例
 *
 * 1.`Ioc`注册`ioredis`配置将会自动创建该实例; @see {@link Config}
 *
 * 2.如已引用配置依赖[NsConfig](https://me.keytop.cn/service/config)将会自动创建该实例;
 *
 * @see [ioredis](https://www.npmjs.com/package/ioredis)
 */
export declare let redisClient: RedisClient;
/**
 * redis分布式锁装饰器
 *
 * **注：如果加锁失败则不会执行被装饰的函数,而是执行lockFailedHandler**
 *
 * ```ts
 * import { RedisLocker } from "refs/nslib";
 *
 * //去掉注释
 * //@RedisLocker(args => { return `${args.parkId}.TASK`; }, args => { return '任务已在执行,请稍后再试'; })
 * async function exec(){
 *
 * }
 * ```
 * @param key redis锁的key
 * @param lockFailedHandler 加锁失败处理
 */
export declare function RedisLocker(key: ((...args: any[]) => string) | string, lockFailedHandler: (...args: any[]) => any, opt?: {
    /**
     * 过期时间(秒)
     */
    ex: number;
    /**
     * 是否自动续约,自动续约时间间隔间隔为过期时间的一半,且最低5秒
     */
    autoRenew?: boolean;
}): MethodDecorator;
