tart

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTartNotFound = errors.New("tart command not found")
	ErrTartFailed   = errors.New("tart command returned non-zero exit code")
	ErrVMFailed     = errors.New("VM errored")
)

Functions

func Exec

func Exec(
	ctx context.Context,
	args ...string,
) (string, string, error)

func ExecWithEnv

func ExecWithEnv(
	ctx context.Context,
	env map[string]string,
	args ...string,
) (string, string, error)

Types

type Config

type Config struct {
	SSHUsername string
	SSHPassword string
	Softnet     bool
	Headless    bool
	AlwaysPull  bool
}

type Env

type Env struct {
	JobID           string
	JobImage        string
	FailureExitCode int
	Registry        *Registry
}

func (Env) VirtualMachineID

func (e Env) VirtualMachineID() string

type Environment

type Environment struct {
	container.HostEnvironment

	Config   Config
	Env      *Env
	Miscpath string
	// contains filtered or unexported fields
}

func (*Environment) Copy

func (e *Environment) Copy(destPath string, files ...*container.FileEntry) common.Executor

func (*Environment) CopyDir

func (e *Environment) CopyDir(destPath string, srcPath string, useGitIgnore bool) common.Executor

func (*Environment) CopyTarStream

func (e *Environment) CopyTarStream(ctx context.Context, destPath string, tarStream io.Reader) error

func (*Environment) Exec

func (e *Environment) Exec(command []string, env map[string]string, user, workdir string) common.Executor

func (*Environment) ExecWithCmdLine

func (e *Environment) ExecWithCmdLine(command []string, cmdline string, env map[string]string, user, workdir string) common.Executor

func (*Environment) GetActPath

func (e *Environment) GetActPath() string

func (*Environment) GetContainerArchive

func (e *Environment) GetContainerArchive(ctx context.Context, srcPath string) (io.ReadCloser, error)

func (*Environment) GetRunnerContext

func (e *Environment) GetRunnerContext(ctx context.Context) map[string]interface{}

func (*Environment) Remove

func (e *Environment) Remove() common.Executor

func (*Environment) Start

func (e *Environment) Start(b bool) common.Executor

func (*Environment) Stop

func (e *Environment) Stop(ctx context.Context) error

func (*Environment) ToContainerPath

func (e *Environment) ToContainerPath(path string) string

func (*Environment) ToHostPath

func (e *Environment) ToHostPath(path string) string

"/Volumes/My Shared Files/act/"

type Registry

type Registry struct {
	Address  string
	User     string
	Password string
}

type VM

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

func CreateNewVM

func CreateNewVM(
	ctx context.Context,
	actEnv Env,
	cpuOverride uint64,
	memoryOverride uint64,
) (*VM, error)

func ExistingVM

func ExistingVM(actEnv Env) *VM

func (*VM) Delete

func (vm *VM) Delete() error

func (*VM) IP

func (vm *VM) IP(ctx context.Context) (string, error)

func (*VM) MonitorTartRunOutput

func (vm *VM) MonitorTartRunOutput()

func (*VM) OpenSSH

func (vm *VM) OpenSSH(ctx context.Context, config Config) (*ssh.Client, error)

func (*VM) Start

func (vm *VM) Start(config Config, _ *Env, customDirectoryMounts []string) error

func (*VM) Stop

func (vm *VM) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳