Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/contrib/tunnelHost/common/tunnelHost.ts
13401 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { Event } from '../../../../base/common/event.js';
7
import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js';
8
import { ITunnelHostInfo } from '../../../../platform/agentHost/common/tunnelAgentHost.js';
9
10
export const ITunnelHostService = createDecorator<ITunnelHostService>('tunnelHostService');
11
12
export interface ITunnelHostService {
13
readonly _serviceBrand: undefined;
14
15
/** Fires when the sharing status changes. */
16
readonly onDidChangeStatus: Event<void>;
17
18
/** Whether the agent host is currently shared via a tunnel. */
19
readonly isSharing: boolean;
20
21
/** Whether a tunnel connection is currently being established. */
22
readonly isConnecting: boolean;
23
24
/** Information about the active tunnel, if sharing. */
25
readonly sharingInfo: ITunnelHostInfo | undefined;
26
27
/** Start sharing the local agent host via a dev tunnel. */
28
startSharing(): Promise<void>;
29
30
/** Stop sharing and tear down the tunnel. */
31
stopSharing(): Promise<void>;
32
}
33
34