clientimplementation

package
v1.15.1-beta.7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MPL-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAgentClient

func BuildAgentClient(ctx context.Context, opts BuildAgentClientOptions) (*config2.Result, error)

BuildAgentClient builds an agent client for workspace operations.

func DecodeOptionsFromEnv

func DecodeOptionsFromEnv(name string, into any) (bool, error)

func DecodePlatformOptionsFromEnv

func DecodePlatformOptionsFromEnv(into *devsy.PlatformOptions) error

func DeleteMachineFolder

func DeleteMachineFolder(context, machineID string) error

func DeleteWorkspaceFolder

func DeleteWorkspaceFolder(params DeleteWorkspaceFolderParams) error

func EncodeOptions

func EncodeOptions(options any, name string) map[string]string

func NewMachineClient

func NewMachineClient(
	devsyConfig *config.Config,
	provider *provider.ProviderConfig,
	machine *provider.Machine,
) (client.MachineClient, error)

func NewProxyClient

func NewProxyClient(
	devsyConfig *config.Config,
	prov *provider.ProviderConfig,
	workspace *provider.Workspace,
) (client.ProxyClient, error)

func NewWorkspaceClient

func NewWorkspaceClient(
	devsyConfig *config.Config,
	providerConfig *provider.ProviderConfig,
	workspace *provider.Workspace,
	machine *provider.Machine,
) (client.WorkspaceClient, error)

func RunCommand

func RunCommand(ctx context.Context, opts RunCommandOptions) error

func RunCommandWithBinaries

func RunCommandWithBinaries(ctx context.Context, cfg WorkspaceCommandConfig) error

func StartServicesDaemon

func StartServicesDaemon(ctx context.Context, opts StartServicesDaemonOptions) error

StartServicesDaemon starts the services daemon for credential forwarding and port forwarding.

func StartWait

func StartWait(ctx context.Context, workspaceClient client.WorkspaceClient, create bool) error

StartWait waits for the workspace to be ready, optionally creating/starting it.

Types

type BuildAgentClientOptions

type BuildAgentClientOptions struct {
	WorkspaceClient client.WorkspaceClient
	CLIOptions      provider.CLIOptions
	AgentCommand    string
	TunnelOptions   []tunnelserver.Option
}

BuildAgentClientOptions contains parameters for BuildAgentClient.

type DeleteWorkspaceFolderParams

type DeleteWorkspaceFolderParams struct {
	Context              string
	WorkspaceID          string
	SSHConfigPath        string
	SSHConfigIncludePath string
}

type RunCommandOptions

type RunCommandOptions struct {
	Command types.StrArray
	Environ []string
	Stdin   io.Reader
	Stdout  io.Writer
	Stderr  io.Writer
}

type StartServicesDaemonOptions

type StartServicesDaemonOptions struct {
	DevsyConfig      *config.Config
	Client           client.DaemonClient
	SSHClient        *ssh.Client
	User             string
	ForwardPorts     bool
	ExtraPorts       []string
	GitSSHSigningKey string
}

type WorkspaceCommandConfig

type WorkspaceCommandConfig struct {
	WorkspaceContextName string
	ExtraEnv             map[string]string
	Options              map[string]config.OptionValue
	Stdin                io.Reader
	Stdout               io.Writer
	Stderr               io.Writer
	Command              types.StrArray
	Workspace            *provider.Workspace
	Machine              *provider.Machine
	Config               *provider.ProviderConfig
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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