getter

package
v1.3.15 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MPL-2.0 Imports: 16 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetError

type GetError struct {
	URL string
	Err error
	// contains filtered or unexported fields
}

GetError wraps the underlying artifact fetching error with the URL. It implements the RecoverableError interface.

func (*GetError) Error

func (g *GetError) Error() string

func (*GetError) IsRecoverable

func (g *GetError) IsRecoverable() bool

type Getter added in v1.1.14

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

Getter wraps go-getter calls in an artifact configuration.

func NewGetter added in v1.1.14

func NewGetter(logger hclog.Logger, config *config.ArtifactConfig) *Getter

NewGetter returns a new Getter instance. This function is called once per client and shared across alloc and task runners.

func TestDefaultGetter added in v1.1.14

func TestDefaultGetter(t *testing.T) *Getter

TestDefaultGetter creates a Getter suitable for unit test cases.

func (*Getter) GetArtifact added in v1.1.14

func (g *Getter) GetArtifact(taskEnv interfaces.EnvReplacer, artifact *structs.TaskArtifact) (returnErr error)

GetArtifact downloads an artifact into the specified task directory.

Jump to

Keyboard shortcuts

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