Help us shape the future of Go! Take the 2026 Go Developer Survey

getter

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MPL-2.0 Imports: 34 Imported by: 22

Documentation

Index

Constants

View Source
const (
	// SubCommand is the first argument to the clone of the nomad
	// agent process for downloading artifacts.
	SubCommand = "artifact-isolation"
)

Variables

This section is empty.

Functions

func SetupDir added in v1.5.0

func SetupDir(t *testing.T) (string, string)

SetupDir creates a directory suitable for testing artifact - i.e. it is owned by the nobody user as would be the case in a normal client operation.

returns alloc_dir, task_dir

Types

type Error added in v1.5.0

type Error struct {
	URL         string
	Err         error
	Recoverable bool
}

Error is a RecoverableError used to include the URL along with the underlying fetching error.

func (*Error) Equal added in v1.5.0

func (e *Error) Equal(o *Error) bool

func (*Error) Error added in v1.5.0

func (e *Error) Error() string

func (*Error) IsRecoverable added in v1.5.0

func (e *Error) IsRecoverable() bool

type Sandbox added in v1.5.0

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

A Sandbox is used to download artifacts.

func New added in v1.5.0

func New(ac *config.ArtifactConfig, logger hclog.Logger) *Sandbox

New creates a Sandbox with the given ArtifactConfig.

func TestSandbox added in v1.5.0

func TestSandbox(t *testing.T) *Sandbox

TestSandbox creates a real artifact downloader configured via the default artifact config. It is good enough for tests so no mock implementation exists.

func (*Sandbox) Get added in v1.5.0

func (s *Sandbox) Get(env interfaces.EnvReplacer, artifact *structs.TaskArtifact) error

Jump to

Keyboard shortcuts

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