/** * Where a container keeps its output on the machine. * * The engine is asked rather than guessed: one `inspect` names the file, the * driver and the state. The driver decides whether there is a file to read at * all — journald, syslog and the binary `local` driver put the output * somewhere this toolset has no reader for, and naming that is the answer, not * an empty result that reads as "no errors". */ import type { SSHConfig } from '../utils/ssh-config.js'; import type { SSHExecutor } from './ssh-executor.js'; /** The only driver that leaves a plain file behind */ export declare const READABLE_DRIVER = "json-file"; /** What the engine answered about one container's log */ export interface ContainerLog { /** The name the caller asked about */ container: string; /** The engine that answered — only docker reads back today */ engine: string; /** Logging driver as the engine names it */ driver: string; /** The file the driver writes to */ path: string; /** Container state: a stopped container still has its log */ status: string; } /** * The log cannot be read, and the reason is worth showing to the caller. * * Every case here is a fact about the machine — no engine, no container, no * permission, a driver without a file — never a failure of the reader. The * way through is added to every refusal alike, by the answer itself. */ export declare class ContainerLogUnavailableError extends Error { constructor(reason: string); } /** * Ask the engine where the container's output is written. * * Throws with the reason whenever there is nothing to read — the caller shows * that reason instead of an empty answer. */ export declare function resolveContainerLog(executor: SSHExecutor, config: SSHConfig, container: string, options?: { sudo?: boolean; signal?: AbortSignal; }): Promise;