Documentation ¶
Index ¶
- Constants
- Variables
- func TartExec(ctx context.Context, args ...string) (string, string, error)
- func TartExecWithEnv(ctx context.Context, env map[string]string, args ...string) (string, string, error)
- type Config
- type VM
- func (vm *VM) Delete() error
- func (vm *VM) IP(ctx context.Context) (string, error)
- func (vm *VM) MonitorTartRunOutput()
- func (vm *VM) OpenSSH(ctx context.Context, config Config) (*ssh.Client, error)
- func (vm *VM) Start(config Config, gitLabEnv *gitlab.Env, customDirectoryMounts []string, ...) error
- func (vm *VM) Stop() error
Constants ¶
View Source
const ( // EnvTartExecutorInternalBuildsDir is an internal environment variable // that does not use the "CUSTOM_ENV_" prefix, thus preventing the override // by the user. EnvTartExecutorInternalBuildsDir = "TART_EXECUTOR_INTERNAL_BUILDS_DIR" // EnvTartExecutorInternalCacheDir is an internal environment variable // that does not use the "CUSTOM_ENV_" prefix, thus preventing the override // by the user. EnvTartExecutorInternalCacheDir = "TART_EXECUTOR_INTERNAL_CACHE_DIR" )
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") )
View Source
var ErrConfigFromEnvironmentFailed = errors.New("failed to load config from environment")
Functions ¶
Types ¶
type Config ¶
type Config struct { SSHUsername string `env:"SSH_USERNAME" envDefault:"admin"` SSHPassword string `env:"SSH_PASSWORD" envDefault:"admin"` SSHPort uint16 `env:"SSH_PORT" envDefault:"22"` Softnet bool `env:"SOFTNET"` Headless bool `env:"HEADLESS" envDefault:"true"` AlwaysPull bool `env:"ALWAYS_PULL" envDefault:"true"` InsecurePull bool `env:"INSECURE_PULL" envDefault:"false"` PullConcurrency uint8 `env:"PULL_CONCURRENCY"` HostDir bool `env:"HOST_DIR"` Shell string `env:"SHELL"` InstallGitlabRunner string `env:"INSTALL_GITLAB_RUNNER"` Timezone string `env:"TIMEZONE"` }
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
func CreateNewVM ¶
func ExistingVM ¶
func (*VM) MonitorTartRunOutput ¶
func (vm *VM) MonitorTartRunOutput()
Click to show internal directories.
Click to hide internal directories.