workspaces

package
v0.0.0-...-6dbdb44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2020 License: EPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkspacesController

type WorkspacesController struct {
	Logger logger.Log
	// contains filtered or unexported fields
}

WorkspacesController useful to add logger and http client.

func NewWorkspaceController

func NewWorkspaceController(c *http.Client) *WorkspacesController

NewWorkspaceController creates a new WorkspacesController from a given client.

func (*WorkspacesController) CreateWorkspace

func (w *WorkspacesController) CreateWorkspace(cheURL string, keycloakUrl string, workspaceDefinition []byte) (workspaceID string, err error)

CreateWorkspace create an workspace using token and given devFile

func (*WorkspacesController) DeleteWorkspace

func (w *WorkspacesController) DeleteWorkspace(keycloakUrl string, cheURL string, workspaceID string) (err error)

DeleteWorkspace delete a workspace from a given workspace_id

func (*WorkspacesController) KeycloakToken

func (w *WorkspacesController) KeycloakToken(keycloakTokenUrl string) (token string, err error)

KeycloakToken return a JWT from keycloak

func (*WorkspacesController) RunWorkspace

func (w *WorkspacesController) RunWorkspace(workspaceDefinition []byte, workspaceStack string) (workspaceID string)

RunWorkspace create a new workspace from a given devfile and call an method to get measure time for workspace after a workspace pod is up and ready

func (*WorkspacesController) StartWorkspace

func (w *WorkspacesController) StartWorkspace(keycloakUrl string, cheURL string, workspaceID string) (err error)

StartWorkspace start a new workspace from a given workspace_id

func (*WorkspacesController) StopWorkspace

func (w *WorkspacesController) StopWorkspace(keycloakUrl string, cheURL string, workspaceID string) (err error)

StopWorkspace stop a workspace from a given workspace_id

func (*WorkspacesController) WaitWorkspaceStatusViaApi

func (w *WorkspacesController) WaitWorkspaceStatusViaApi(keycloakUrl string, cheURL string, workspaceID string, desiredStatus string, timeoutInSeconds int) (err error)

WaitWorkspaceStatusViaApi waits for workspace to have desired status in specified timeout

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL