-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate the ssh tunnel from supervisor to ws-proxy
- Loading branch information
Showing
17 changed files
with
325 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright (c) 2020 Gitpod GmbH. All rights reserved. | ||
// Licensed under the GNU Affero General Public License (AGPL). | ||
// See License.AGPL.txt in the project root for license information. | ||
|
||
package common | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/gitpod-io/gitpod/ws-manager/api" | ||
wsapi "github.com/gitpod-io/gitpod/ws-manager/api" | ||
) | ||
|
||
const ( | ||
// Used as key for storing the workspace port in the requests mux.Vars() map. | ||
WorkspacePortIdentifier = "workspacePort" | ||
|
||
// Used as key for storing the workspace ID in the requests mux.Vars() map. | ||
WorkspaceIDIdentifier = "workspaceID" | ||
|
||
DebugWorkspaceIdentifier = "debugWorkspace" | ||
|
||
WorkspacePathPrefixIdentifier = "workspacePathPrefix" | ||
|
||
WorkspaceInfoIdentifier = "workspaceInfo" | ||
) | ||
|
||
// WorkspaceCoords represents the coordinates of a workspace (port). | ||
type WorkspaceCoords struct { | ||
// The workspace ID | ||
ID string | ||
// The workspace port | ||
Port string | ||
// Debug workspace | ||
Debug bool | ||
} | ||
|
||
// WorkspaceInfoProvider is an entity that is able to provide workspaces related information. | ||
type WorkspaceInfoProvider interface { | ||
// WorkspaceInfo returns the workspace information of a workspace using it's workspace ID | ||
WorkspaceInfo(workspaceID string) *WorkspaceInfo | ||
} | ||
|
||
// WorkspaceInfo is all the infos ws-proxy needs to know about a workspace. | ||
type WorkspaceInfo struct { | ||
WorkspaceID string | ||
InstanceID string | ||
URL string | ||
|
||
IDEImage string | ||
SupervisorImage string | ||
|
||
// (parsed from URL) | ||
IDEPublicPort string | ||
|
||
IPAddress string | ||
|
||
Ports []*api.PortSpec | ||
|
||
Auth *wsapi.WorkspaceAuthentication | ||
StartedAt time.Time | ||
|
||
OwnerUserId string | ||
SSHPublicKeys []string | ||
IsRunning bool | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.