workspace

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name          string
	LocalDirPath  string
	RemoteDirPath string
}

func (Asset) LocalPath

func (i Asset) LocalPath() string

func (Asset) RemotePath

func (i Asset) RemotePath(workspaceDirPath string) string

type ContainerEnv

type ContainerEnv struct{}

func (ContainerEnv) WorkingDir

func (e ContainerEnv) WorkingDir() string

type CreateOpts

type CreateOpts struct {
	Name         string
	GenerateName bool

	Image       string
	Command     []string
	CommandArgs []string
	Privileged  bool

	Ports []int

	ServiceAccountName string
}

type DownloadOutput

type DownloadOutput struct {
	Asset
}

type ExecuteOpts

type ExecuteOpts struct {
	WorkingDir          string
	WorkingDirFromInput string

	Command     []string
	CommandArgs []string
}

type PodStartWaiter

type PodStartWaiter struct {
	// contains filtered or unexported fields
}

func (PodStartWaiter) WaitForStart

func (l PodStartWaiter) WaitForStart(cancelCh chan struct{}) (corev1.PodPhase, error)

type UploadInput

type UploadInput struct {
	Asset
}

type UploadInputs

type UploadInputs []UploadInput

func (UploadInputs) FindByName

func (is UploadInputs) FindByName(name string) (UploadInput, bool)

type Workspace

type Workspace interface {
	Name() string
	Image() string
	State() string
	CreationTime() time.Time

	Ports() []string
	Privileged() bool

	LastUsedTime() time.Time
	MarkUse() error

	AltNames() []string
	AddAltName(string) error

	WaitForStart(chan struct{}) error

	Enter() error
	Execute(ExecuteOpts, *rest.Config) error

	Upload(UploadInput, *rest.Config) error // TODO remove rest.Config
	Download(DownloadOutput, *rest.Config) error

	Delete(bool) error
}

type WorkspaceDesktop

type WorkspaceDesktop struct {
	Workspace Workspace
}

func (WorkspaceDesktop) AddChrome

func (w WorkspaceDesktop) AddChrome(restConfig *rest.Config) error

func (WorkspaceDesktop) AddFirefox

func (w WorkspaceDesktop) AddFirefox(restConfig *rest.Config) error

func (WorkspaceDesktop) AddGo1x added in v0.0.5

func (w WorkspaceDesktop) AddGo1x(restConfig *rest.Config) error

func (WorkspaceDesktop) AddSublimeText

func (w WorkspaceDesktop) AddSublimeText(restConfig *rest.Config) error

func (WorkspaceDesktop) Install

func (w WorkspaceDesktop) Install(restConfig *rest.Config) error

type WorkspaceImpl

type WorkspaceImpl struct {
	// contains filtered or unexported fields
}

func (*WorkspaceImpl) AddAltName

func (w *WorkspaceImpl) AddAltName(name string) error

func (*WorkspaceImpl) AltNames

func (w *WorkspaceImpl) AltNames() []string

func (*WorkspaceImpl) CreationTime

func (w *WorkspaceImpl) CreationTime() time.Time

func (*WorkspaceImpl) Delete

func (w *WorkspaceImpl) Delete(wait bool) error

func (*WorkspaceImpl) Download

func (w *WorkspaceImpl) Download(output DownloadOutput, restConfig *rest.Config) error

func (*WorkspaceImpl) Enter

func (w *WorkspaceImpl) Enter() error

func (*WorkspaceImpl) Execute

func (w *WorkspaceImpl) Execute(opts ExecuteOpts, restConfig *rest.Config) error

func (*WorkspaceImpl) Image added in v0.0.3

func (w *WorkspaceImpl) Image() string

func (*WorkspaceImpl) LastUsedTime

func (w *WorkspaceImpl) LastUsedTime() time.Time

func (*WorkspaceImpl) MarkUse

func (w *WorkspaceImpl) MarkUse() error

func (*WorkspaceImpl) Name

func (w *WorkspaceImpl) Name() string

func (*WorkspaceImpl) Ports

func (w *WorkspaceImpl) Ports() []string

func (*WorkspaceImpl) Privileged

func (w *WorkspaceImpl) Privileged() bool

func (*WorkspaceImpl) State added in v0.0.3

func (w *WorkspaceImpl) State() string

func (*WorkspaceImpl) Upload

func (w *WorkspaceImpl) Upload(input UploadInput, restConfig *rest.Config) error

func (*WorkspaceImpl) WaitForStart

func (w *WorkspaceImpl) WaitForStart(cancelCh chan struct{}) error

type Workspaces

type Workspaces struct {
	// contains filtered or unexported fields
}

func NewWorkspaces

func NewWorkspaces(namespace string, coreClient kubernetes.Interface) Workspaces

func (Workspaces) Create

func (w Workspaces) Create(opts CreateOpts) (Workspace, error)

func (Workspaces) Find

func (w Workspaces) Find(name string) (Workspace, error)

func (Workspaces) List

func (w Workspaces) List() ([]Workspace, error)

Jump to

Keyboard shortcuts

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