Documentation
¶
Index ¶
- type Executor
- type LocalExecutor
- func (e *LocalExecutor) CreateWorkspace(ctx context.Context, ws *models.Workspace, logWriter io.Writer, ...) error
- func (e *LocalExecutor) DeleteWorkspace(ctx context.Context, ws *models.Workspace, logWriter io.Writer) error
- func (e *LocalExecutor) GetWorkspacePath(ws *models.Workspace) string
- func (e *LocalExecutor) InstallPackages(ctx context.Context, ws *models.Workspace, packages []string, ...) error
- func (e *LocalExecutor) RemovePackages(ctx context.Context, ws *models.Workspace, packages []string, ...) error
- func (e *LocalExecutor) SolveEnvironment(ctx context.Context, ws *models.Workspace, logWriter io.Writer) error
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
// SolveEnvironment runs pixi install to solve and install the current pixi.toml
SolveEnvironment(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
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