executor

package
v0.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// CreateWorkspace creates a new workspace with optional pixi.toml content
	CreateWorkspace(ctx context.Context, ws *models.Workspace, logWriter io.Writer, pixiToml ...string) error

	// InstallPackages installs packages in a workspace
	InstallPackages(ctx context.Context, ws *models.Workspace, packages []string, logWriter io.Writer) error

	// RemovePackages removes packages from a workspace
	RemovePackages(ctx context.Context, ws *models.Workspace, packages []string, logWriter io.Writer) error

	// DeleteWorkspace removes a workspace
	DeleteWorkspace(ctx context.Context, ws *models.Workspace, logWriter io.Writer) error

	// GetWorkspacePath returns the filesystem path for a workspace
	GetWorkspacePath(ws *models.Workspace) string
}

Executor interface for running workspace operations

type LocalExecutor

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

LocalExecutor runs operations on the local machine

func NewLocalExecutor

func NewLocalExecutor(cfg *config.Config) (*LocalExecutor, error)

NewLocalExecutor creates a new local executor

func (*LocalExecutor) CreateWorkspace

func (e *LocalExecutor) CreateWorkspace(ctx context.Context, ws *models.Workspace, logWriter io.Writer, pixiToml ...string) error

CreateWorkspace creates a new workspace on the local filesystem

func (*LocalExecutor) DeleteWorkspace

func (e *LocalExecutor) DeleteWorkspace(ctx context.Context, ws *models.Workspace, logWriter io.Writer) error

DeleteWorkspace removes a workspace from the filesystem. For source=="local" workspaces the directory belongs to the user, so we only deregister (the caller handles DB cleanup) and never touch the filesystem.

func (*LocalExecutor) GetWorkspacePath

func (e *LocalExecutor) GetWorkspacePath(ws *models.Workspace) string

GetWorkspacePath returns the filesystem path for a workspace For source=="local" workspaces with a path set, returns that path directly. Otherwise: {baseDir}/{normalized-name}-{uuid}

func (*LocalExecutor) InstallPackages

func (e *LocalExecutor) InstallPackages(ctx context.Context, ws *models.Workspace, packages []string, logWriter io.Writer) error

InstallPackages installs packages in a workspace

func (*LocalExecutor) RemovePackages

func (e *LocalExecutor) RemovePackages(ctx context.Context, ws *models.Workspace, packages []string, logWriter io.Writer) error

RemovePackages removes packages from a workspace

Jump to

Keyboard shortcuts

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