import type { DeviceLogsBackend, HistoryOpts, InternalDeviceLog, LogContext, OutputDeviceLog, Subscription } from '../struct.js'; import type { Result } from 'ioredis'; declare module 'ioredis' { interface RedisCommander { publishLogs(logsKey: string, bytesWrittenKey: string, subscribersKey: string, ...args: [...logs: string[], bytesWritten: number, limit: number]): Result; incrSubscribers(subscribersKey: string): Result; decrSubscribers(subscribersKey: string): Result; } } export declare class RedisBackend implements DeviceLogsBackend { private subscriptions; private subscriptionHeartbeats; constructor(); history(ctx: LogContext, { count, start }: HistoryOpts): Promise; get available(): boolean; publish(ctx: LogContext, logs: InternalDeviceLog[]): Promise; subscribe(ctx: LogContext, subscription: Subscription): void; unsubscribe(ctx: LogContext, subscription: Subscription): void; private get connected(); private getKey; private handleMessage; private fromRedisLog; private toRedisLog; }