getter

package
v0.0.0-...-ae3a0a2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MPL-2.0 Imports: 32 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

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

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

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

func (*Error) Error

func (e *Error) Error() string

func (*Error) IsRecoverable

func (e *Error) IsRecoverable() bool

type Sandbox

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

A Sandbox is used to download artifacts.

func New

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

New creates a Sandbox with the given ArtifactConfig.

func TestSandbox

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

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