Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ProxyEndpoint path that that Proxy is supposed to handle ProxyEndpoint = "/api/terminal/proxy/" // AvailableEndpoint path used to check if functionality is enabled AvailableEndpoint = "/api/terminal/available/" // WorkspaceInitEndpoint is used to initialize a kubeconfig in the workspace WorkspaceInitEndpoint = "exec/init" // WorkspaceActivityEndpoint is used to prevent idle timeout in a workspace WorkspaceActivityEndpoint = "activity/tick" // WorkspaceCreatorLabel stores the UID of the user that created the workspace. Only this user should be able to // access the workspace WorkspaceCreatorLabel = "controller.devfile.io/creator" // WorkspaceRestrictedAcccessAnnotation signifies that a workspace expects webhooks to be enabled. If they are not, // startup is blocked. WorkspaceRestrictedAcccessAnnotation = "controller.devfile.io/restricted-access" )
Variables ¶
View Source
var ( WorkspaceGroupVersionResource = schema.GroupVersionResource{ Group: "workspace.devfile.io", Version: "v1alpha1", Resource: "devworkspaces", } UserGroupVersionResource = schema.GroupVersionResource{ Group: "user.openshift.io", Version: "v1", Resource: "users", } )
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct { TLSClientConfig *tls.Config ClusterEndpoint *url.URL // contains filtered or unexported fields }
Proxy provides handlers to handle terminal related requests
func (*Proxy) HandleProxy ¶
HandleProxy evaluates the namespace and workspace names from URL and after check that it's created by the current user - proxies the request there
func (*Proxy) HandleProxyEnabled ¶
func (p *Proxy) HandleProxyEnabled(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.