executor

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 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 CreateWorkspaceOptions added in v0.10.5

type CreateWorkspaceOptions struct {
	PixiToml string
	SeedDir  string
}

CreateWorkspaceOptions tunes CreateWorkspace. PixiToml seeds a newly created workspace with a pinned manifest. SeedDir seeds a newly created workspace from a pre-populated directory (used for bundle imports); when non-empty, PixiToml is ignored because the seed's pixi.toml is authoritative. SeedDir is removed after a successful create to keep staging from leaking.

type Executor

type Executor interface {
	CreateWorkspace(ctx context.Context, ws *models.Workspace, logWriter io.Writer, opts CreateWorkspaceOptions) error
	InstallPackages(ctx context.Context, ws *models.Workspace, packages []string, logWriter io.Writer) error
	RemovePackages(ctx context.Context, ws *models.Workspace, packages []string, logWriter io.Writer) error
	DeleteWorkspace(ctx context.Context, ws *models.Workspace, logWriter io.Writer) error
	SolveEnvironment(ctx context.Context, ws *models.Workspace, logWriter io.Writer) error
	GetWorkspacePath(ws *models.Workspace) string
	// StagingRoot returns a directory under the executor's storage root
	// suitable for one-off staging (e.g. bundle import pre-extraction).
	// The directory is ensured to exist.
	StagingRoot() 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, opts CreateWorkspaceOptions) 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

func (*LocalExecutor) SolveEnvironment added in v0.10.4

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

SolveEnvironment runs pixi install to solve and install the current pixi.toml

func (*LocalExecutor) StagingRoot added in v0.10.5

func (e *LocalExecutor) StagingRoot() string

StagingRoot returns {baseDir}/.import-staging, creating it if missing.

Jump to

Keyboard shortcuts

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