recall

package
v0.0.0-...-baa34e0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadReleases

func DownloadReleases(releases []string, path string, options bond.BuildOptions) error

DownloadReleases accesses the feed and, based on the arguments provided, does the work to download the specified versions of MongoDB from the downloads feed. This operation is meant to provide the basis for command-line interfaces for downloading groups of MongoDB versions.

func FetchReleases

func FetchReleases(ctx context.Context, releases []string, path string, options bond.BuildOptions) error

FetchReleases has the same behavior as DownloadReleases, but takes a Context to facilitate caller implemented timeouts and cancelation.

Types

type DownloadFileJob

type DownloadFileJob struct {
	URL       string `bson:"url" json:"url" yaml:"url"`
	Directory string `bson:"dir" json:"dir" yaml:"dir"`
	FileName  string `bson:"file" json:"file" yaml:"file"`
	*job.Base `bson:"metadata" json:"metadata" yaml:"metadata"`
}

DownloadFileJob is an amboy.Job implementation that supports downloading a a file to the local file system.

func NewDownloadJob

func NewDownloadJob(url, path string, force bool) (*DownloadFileJob, error)

NewDownloadJob constructs a DownloadFileJob. The job has a dependency on the downloaded file, and will only execute if that file does not exist.

func (*DownloadFileJob) Run

func (j *DownloadFileJob) Run(ctx context.Context)

Run implements the main action of the Job. This implementation checks the job directly and returns early if the downloaded file exists. This behavior may be redundant in the case that the queue skips jobs with "passed" jobs.

Jump to

Keyboard shortcuts

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