cockpit-plugin-base-react - v2.3.0
    Preparing search index...

    Interface AsyncStreamResult

    Accumulated result of a streaming Cockpit process.

    interface AsyncStreamResult {
        cancel: () => void;
        detach: () => DetachedStream | null;
        done: boolean;
        errorMsg: string;
        failed: boolean;
        lines: string[];
    }
    Index
    cancel: () => void

    Closes the underlying process and stops accumulating output.

    detach: () => DetachedStream | null

    Stops tracking the running process without closing it, so another owner (a background task queue, say) can take it over: register your own stream() callback and then()/catch() on the returned process. The hook will no longer update its state for it, nor close it on unmount.

    pending is output received after the last newline, which has not reached lines yet — prepend it to the new owner's buffer so no output is lost.

    Returns null when there is nothing to hand over: the process has not been launched yet, or has already finished, or was cancelled or detached before.

    done: boolean

    true once the process exits (success or failure).

    errorMsg: string

    Error message when failed is true, otherwise empty string.

    failed: boolean

    true when the process exited with an error.

    lines: string[]

    All output lines received so far, with blank lines and CR stripped.