UNPKG

@micro.ts/core

Version:

Microservice framework with Typescript

17 lines (16 loc) 495 B
import { Redis } from 'ioredis'; export declare class RedisClient { private config; redis?: Redis; constructor(config: { url: string; } & { [key: string]: any; }); init(): Promise<void>; get(key: string): Promise<string | null>; set(key: string, value: string, ex?: number): Promise<void>; delete(key: string): Promise<void>; getJson<T>(key: string): Promise<T | null>; setJson<T>(key: string, value: T, ex?: number): Promise<void>; }