commands

package
v0.0.0-...-68416f9 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Execute(
		ctx context.Context,
		logger logger.Logger,
		lvl zapcore.Level,
		proxy *proxy.SandboxProxy,
		sandboxID string,
		prefix string,
		step *templatemanager.TemplateStep,
		cmdMetadata metadata.Context,
	) (metadata.Context, error)
}

type CommandExecutor

type CommandExecutor struct {
	buildcontext.BuildContext
	// contains filtered or unexported fields
}

func NewCommandExecutor

func NewCommandExecutor(
	buildContext buildcontext.BuildContext,
	buildStorage storage.StorageProvider,
	proxy *proxy.SandboxProxy,
) *CommandExecutor

func (*CommandExecutor) Execute

func (ce *CommandExecutor) Execute(
	ctx context.Context,
	userLogger logger.Logger,
	lvl zapcore.Level,
	sbx *sandbox.Sandbox,
	prefix string,
	step *templatemanager.TemplateStep,
	cmdMetadata metadata.Context,
) (metadata.Context, error)

type Copy

type Copy struct {
	FilesStorage storage.StorageProvider
	CacheScope   string
}

func (*Copy) Execute

func (c *Copy) Execute(
	ctx context.Context,
	logger logger.Logger,
	_ zapcore.Level,
	proxy *proxy.SandboxProxy,
	sandboxID string,
	_ string,
	step *templatemanager.TemplateStep,
	cmdMetadata metadata.Context,
) (metadata.Context, error)

Note: The temporary files in the /tmp directory are cleaned up automatically on sandbox restart because the /tmp is mounted as a tmpfs and deleted on restart.

type Env

type Env struct{}

func (*Env) Execute

func (e *Env) Execute(
	ctx context.Context,
	_ logger.Logger,
	_ zapcore.Level,
	proxy *proxy.SandboxProxy,
	sandboxID string,
	_ string,
	step *templatemanager.TemplateStep,
	cmdMetadata metadata.Context,
) (metadata.Context, error)

type Run

type Run struct{}

func (*Run) Execute

func (r *Run) Execute(
	ctx context.Context,
	logger logger.Logger,
	lvl zapcore.Level,
	proxy *proxy.SandboxProxy,
	sandboxID string,
	prefix string,
	step *templatemanager.TemplateStep,
	cmdMetadata metadata.Context,
) (metadata.Context, error)

type User

type User struct{}

func (*User) Execute

func (u *User) Execute(
	ctx context.Context,
	logger logger.Logger,
	lvl zapcore.Level,
	proxy *proxy.SandboxProxy,
	sandboxID string,
	prefix string,
	step *templatemanager.TemplateStep,
	cmdMetadata metadata.Context,
) (metadata.Context, error)

type Workdir

type Workdir struct{}

func (*Workdir) Execute

func (w *Workdir) Execute(
	ctx context.Context,
	logger logger.Logger,
	lvl zapcore.Level,
	proxy *proxy.SandboxProxy,
	sandboxID string,
	prefix string,
	step *templatemanager.TemplateStep,
	cmdMetadata metadata.Context,
) (metadata.Context, error)

Jump to

Keyboard shortcuts

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