downloader

package
v0.0.0-...-1643519 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package archiver implements the pipeline to efficiently archive file sets to an isolated server as fast as possible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	common.Canceler
	// contains filtered or unexported fields
}

Downloader is a high level interface to an isolatedclient.Client.

Downloader provides functionality to download full isolated trees.

func New

func New(ctx context.Context, c *isolatedclient.Client, maxConcurrentJobs int) *Downloader

New returns a Downloader instance.

ctx will be used for logging.

func (*Downloader) FetchIsolated

func (d *Downloader) FetchIsolated(hash isolated.HexDigest, outputDir string) ([]string, error)

FetchIsolated downloads an entire isolated tree into a specified output directory.

Returns a list of paths relative to outputDir for all downloaded files.

Note that this method is not thread-safe and it does not flush the Downloader's directory cache.

Jump to

Keyboard shortcuts

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