import { Kubectl } from "../kubectl" ; import { IDockerfile } from "../docker/parser" ; import { Dictionary } from "../utils/dictionary" ; import { ProcessInfo } from "./debugUtils" ; export interface PortInfo { readonly debugPort : number ; readonly appPort ? : number ; } interface Accepted { readonly cancelled : false ; readonly value ? : string ; } interface Cancelled { readonly cancelled : true ; } export type Cancellable = Accepted | Cancelled ; export interface IDebugProvider { /**
     * The debugger type supported by the provider.
     */ getDebuggerType ( ) : string ; /**
     * The required debugger extension is installed or not.
     */ isDebuggerInstalled ( ) : Promise < boolean > ; param workspaceFolder param sessionName param port return startDebugging ( workspaceFolder , sessionName , port , pod , pidToDebug ) : Promise < boolean > ; param baseImage return isSupportedImage ( baseImage ) : boolean ; param dockerfile param env return resolvePortsFromFile ( dockerfile , env ) : Promise < PortInfo | undefined > ; param kubectl param pod param container return resolvePortsFromContainer ( kubectl , pod , podNamespace , container ) : Promise < PortInfo | undefined > ; param processes return filterSupportedProcesses ( processes ) : ProcessInfo [ ] | undefined ; /**
     * Returns true if the debugger requires a port to connect to.
     */ isPortRequired ( ) : boolean ; /**
     * The additional args required by the debugger
     */ getDebugArgs ( ) : Promise < Cancellable > ; }