MCPcopy
hub / github.com/gitpod-io/gitpod / GetWorkspaceInfo

Method GetWorkspaceInfo

components/ws-proxy/pkg/sshproxy/server.go:325–334  ·  view source on GitHub ↗
(workspaceId string)

Source from the content-addressed store, hash-verified

323}
324
325func (s *Server) GetWorkspaceInfo(workspaceId string) (*p.WorkspaceInfo, error) {
326 wsInfo := s.workspaceInfoProvider.WorkspaceInfo(workspaceId)
327 if wsInfo == nil {
328 if matched, _ := regexp.Match(workspaceIDRegex, []byte(workspaceId)); matched {
329 return nil, ErrWorkspaceNotFound
330 }
331 return nil, ErrWorkspaceIDInvalid
332 }
333 return wsInfo, nil
334}
335
336func (s *Server) TrackSSHConnection(wsInfo *p.WorkspaceInfo, phase string, err error) {
337 // if we didn't find an associated user, we don't want to track

Callers 1

NewFunction · 0.95

Calls 2

MatchMethod · 0.80
WorkspaceInfoMethod · 0.65

Tested by

no test coverage detected