import { spawnSync } from "node:child_process"; import type { RedisRuntimeStatus, RedisServiceConfig } from "../types.js"; export interface RedisManagerDependencies { run?: typeof spawnSync; redisFactory?: (opts: { host?: string; port?: number; password?: string; username?: string; }) => { connect: () => Promise; ping: () => Promise; disconnect: () => void; }; } export interface RedisCheckOptions { dryRun?: boolean; logger?: (msg: string) => void; } export declare class RedisManager { private readonly run; private readonly redisFactory; constructor(deps?: RedisManagerDependencies); checkMode(config?: RedisServiceConfig): RedisRuntimeStatus; ensureDocker(config: RedisServiceConfig, options?: RedisCheckOptions): { ok: boolean; message?: string; container?: string; }; start(containerName: string): { ok: boolean; message?: string; }; stop(containerName: string): { ok: boolean; message?: string; }; restart(containerName: string): { ok: boolean; message?: string; }; status(containerName: string): { ok: boolean; running: boolean; message?: string; }; remove(containerName: string): { ok: boolean; message?: string; }; checkExternal(config: RedisServiceConfig): Promise; checkAndPing(config: RedisServiceConfig, options?: RedisCheckOptions): Promise; private pingRedis; }