Documentation ¶
Index ¶
- Constants
- type BaseClient
- type BaseWorkspaceClient
- type Client
- type CommandOptions
- type CreateOptions
- type DeleteOptions
- type InitOptions
- type MachineClient
- type ProxyClient
- type SshOptions
- type StartOptions
- type Status
- type StatusOptions
- type StopOptions
- type UpBaseOptions
- type UpOptions
- type ValidateOptions
- type WorkspaceClient
- type WorkspaceStatus
Constants ¶
View Source
const ( StatusRunning = "Running" StatusBusy = "Busy" StatusStopped = "Stopped" StatusNotFound = "NotFound" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClient ¶ added in v0.2.0
type BaseClient interface { // Provider returns the name of the provider Provider() string // Context returns the context of the provider Context() string // RefreshOptions updates the options RefreshOptions(ctx context.Context, userOptions []string) error // Status retrieves the workspace status Status(ctx context.Context, options StatusOptions) (Status, error) // Stop stops the workspace Stop(ctx context.Context, options StopOptions) error // Delete deletes the workspace Delete(ctx context.Context, options DeleteOptions) error }
type BaseWorkspaceClient ¶ added in v0.2.0
type BaseWorkspaceClient interface { BaseClient // Workspace returns the workspace of this provider Workspace() string // WorkspaceConfig returns the workspace config WorkspaceConfig() *provider.Workspace // Lock locks the workspace. This is a file lock, which means // the workspace is locked across processes. Lock(ctx context.Context) error // Unlock unlocks the workspace. Unlock() }
type Client ¶
type Client interface { BaseClient // AgentLocal returns if the agent runs locally AgentLocal() bool // AgentPath returns the agent path AgentPath() string // AgentURL returns the agent download url AgentURL() string // Create creates a new workspace Create(ctx context.Context, options CreateOptions) error // Start starts the workspace Start(ctx context.Context, options StartOptions) error // Command creates an SSH tunnel into the workspace Command(ctx context.Context, options CommandOptions) error }
type CommandOptions ¶
type CreateOptions ¶
type CreateOptions struct{}
type DeleteOptions ¶
type InitOptions ¶
type InitOptions struct{}
type MachineClient ¶
type ProxyClient ¶ added in v0.2.0
type ProxyClient interface { BaseWorkspaceClient // Up creates a new remote workspace Up(ctx context.Context, options UpOptions) error // Ssh starts an ssh tunnel to the workspace container Ssh(ctx context.Context, options SshOptions) error }
type StartOptions ¶
type StartOptions struct{}
type StatusOptions ¶
type StatusOptions struct {
ContainerStatus bool `json:"containerStatus,omitempty"`
}
type StopOptions ¶
type StopOptions struct{}
type UpBaseOptions ¶ added in v0.2.0
type UpBaseOptions struct { ID string `json:"id,omitempty"` Source string `json:"source,omitempty"` IDE string `json:"ide,omitempty"` IDEOptions []string `json:"ideOptions,omitempty"` DevContainerPath string `json:"devContainerPath,omitempty"` PrebuildRepositories []string `json:"prebuildRepositories,omitempty"` Recreate bool `json:"recreate,omitempty"` }
type UpOptions ¶ added in v0.2.0
type UpOptions struct { UpBaseOptions Stdin io.Reader Stdout io.Writer }
type ValidateOptions ¶
type ValidateOptions struct{}
type WorkspaceClient ¶
type WorkspaceClient interface { BaseWorkspaceClient Client // AgentConfig returns the agent config to send to the agent AgentConfig() provider.ProviderAgentConfig // AgentInfo returns the info to send to the agent AgentInfo() (string, *provider.AgentWorkspaceInfo, error) }
Click to show internal directories.
Click to hide internal directories.