getter

package
v1.6.112 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MPL-2.0 Imports: 33 Imported by: 0

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.6.105

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

SetupDir creates a directory suitable for testing artifact - i.e. it is owned by the user under which nomad runs.

returns alloc_dir, task_dir

Types

type Error added in v1.6.105

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.6.105

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

func (*Error) Error added in v1.6.105

func (e *Error) Error() string

func (*Error) IsRecoverable added in v1.6.105

func (e *Error) IsRecoverable() bool

type Sandbox added in v1.6.105

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

A Sandbox is used to download artifacts.

func New added in v1.6.105

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

New creates a Sandbox with the given ArtifactConfig.

func TestSandbox added in v1.6.105

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.6.105

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