getter

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MPL-2.0 Imports: 32 Imported by: 21

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 user under which nomad runs.

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