setup

package
v0.0.0-...-7426b64 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const MaxConcurrency = 5

MaxConcurrency is maximum number of parallel artifact installations

Variables

View Source
var NotInstalledError = errs.New("Runtime is not completely installed.")

NotInstalledError is an error returned when the runtime is not completely installed yet.

Functions

func ExecDir

func ExecDir(targetDir string) string

Types

type ArtifactDownloadError

type ArtifactDownloadError struct {
	*errs.WrapperError
}

ArtifactDownloadError designates an error downloading an artifact.

type ArtifactInstallError

type ArtifactInstallError struct {
	*errs.WrapperError
}

ArtifactInstallError designates an error installing a downloaded artifact.

type ArtifactResolver

type ArtifactResolver interface {
	ResolveArtifactName(artifact.ArtifactID) string
}

type ArtifactSetupErrors

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

ArtifactSetupErrors combines all errors that can happen while installing artifacts in parallel

func (*ArtifactSetupErrors) Error

func (a *ArtifactSetupErrors) Error() string

func (*ArtifactSetupErrors) Errors

func (a *ArtifactSetupErrors) Errors() []error

Errors returns the individual error messages collected from all failing artifact installations

func (*ArtifactSetupErrors) LocalizedError

func (a *ArtifactSetupErrors) LocalizedError() string

UserError returns a message including all user-facing sub-error messages

type ArtifactSetuper

type ArtifactSetuper interface {
	EnvDef(tmpInstallDir string) (*envdef.EnvironmentDefinition, error)
	Unarchiver() unarchiver.Unarchiver
}

ArtifactSetuper is the interface for an implementation of artifact setup functions These need to be specialized for each BuildEngine type

type BuildError

type BuildError struct {
	*locale.LocalizedError
}

BuildError designates a recipe build error.

type Configurable

type Configurable interface {
	GetString(key string) string
	GetBool(key string) bool
}

type ExecutorSetupError

type ExecutorSetupError struct {
	*errs.WrapperError
}

type ProgressReportError

type ProgressReportError struct {
	*errs.WrapperError
}

ProgressReportError designates an error in the event handler for reporting progress.

type RuntimeInUseError

type RuntimeInUseError struct {
	*locale.LocalizedError
	Processes []*graph.ProcessInfo
}

type Setup

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

func New

func New(target Targeter, eventHandler events.Handler, auth *authentication.Auth, an analytics.Dispatcher, cfg Configurable, out output.Outputer, svcm *model.SvcModel) *Setup

New returns a new Setup instance that can install a Runtime locally on the machine.

func (*Setup) Solve

func (s *Setup) Solve() (*apimodel.BuildResult, *bpModel.Commit, error)

func (*Setup) Update

func (s *Setup) Update(buildResult *apimodel.BuildResult, commit *bpModel.Commit) (rerr error)

type Setuper

type Setuper interface {
	// DeleteOutdatedArtifacts deletes outdated artifact as best as it can
	DeleteOutdatedArtifacts(artifact.ArtifactChangeset, store.StoredArtifactMap, store.StoredArtifactMap) error
	DownloadsFromBuild(build bpModel.Build, artifacts map[strfmt.UUID]artifact.Artifact) (download []artifact.ArtifactDownload, err error)
}

type Targeter

type Targeter interface {
	CommitUUID() strfmt.UUID
	Name() string
	Owner() string
	Dir() string
	Trigger() target.Trigger
	ProjectDir() string

	// ReadOnly communicates that this target should only use cached runtime information (ie. don't check for updates)
	ReadOnly() bool
	// InstallFromDir communicates that this target should only install artifacts from the given directory (i.e. offline installer)
	InstallFromDir() *string
}

Directories

Path Synopsis
implementations

Jump to

Keyboard shortcuts

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