/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
/// <reference types="node" />
import type { Readable } from "stream";
export interface GetPortFromStreamArgs {
    /**
     * Should be case insensitive
     * Must have a named matching group called `address`
     */
    lineRegex: {
        match: (line: string) => {
            matched: boolean;
            groups?: {
                address?: string;
            };
            raw?: RegExpExecArray;
        };
        rawMatcher: string;
    };
    /**
     * Called when the port is found
     */
    onFind?: () => void;
    /**
     * Timeout for how long to wait for the port.
     * Default: 15s
     */
    timeout?: number;
}
export type GetPortFromStream = (stream: Readable, args: GetPortFromStreamArgs) => Promise<number>;
declare const getPortFromStreamInjectable: import("@ogre-tools/injectable").Injectable<GetPortFromStream, unknown, void>;
export default getPortFromStreamInjectable;
