Path: blob/main/src/vs/sessions/contrib/tunnelHost/common/tunnelHost.ts
13401 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { Event } from '../../../../base/common/event.js';6import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js';7import { ITunnelHostInfo } from '../../../../platform/agentHost/common/tunnelAgentHost.js';89export const ITunnelHostService = createDecorator<ITunnelHostService>('tunnelHostService');1011export interface ITunnelHostService {12readonly _serviceBrand: undefined;1314/** Fires when the sharing status changes. */15readonly onDidChangeStatus: Event<void>;1617/** Whether the agent host is currently shared via a tunnel. */18readonly isSharing: boolean;1920/** Whether a tunnel connection is currently being established. */21readonly isConnecting: boolean;2223/** Information about the active tunnel, if sharing. */24readonly sharingInfo: ITunnelHostInfo | undefined;2526/** Start sharing the local agent host via a dev tunnel. */27startSharing(): Promise<void>;2829/** Stop sharing and tear down the tunnel. */30stopSharing(): Promise<void>;31}323334