Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FileNotFoundError = errors.New("file not found")
FileNotFoundError is an error type used to signal 404 HTTP status code responses.
Functions ¶
This section is empty.
Types ¶
type ArchiveFetcher ¶
type ArchiveFetcher struct {
// contains filtered or unexported fields
}
ArchiveFetcher holds the HTTP client that reties with back off when the file server is offline.
func NewArchiveFetcher ¶
func NewArchiveFetcher(retries, maxDownloadSize, maxUntarSize int, hostnameOverwrite string) *ArchiveFetcher
NewArchiveFetcher configures the retryable http client used for fetching archives.
func (*ArchiveFetcher) Fetch ¶
func (r *ArchiveFetcher) Fetch(archiveURL, checksum, dir string) error
Fetch downloads, verifies and extracts the tarball content to the specified directory. If the file server responds with 5xx errors, the download operation is retried. If the file server responds with 404, the returned error is of type FileNotFoundError. If the file server is unavailable for more than 3 minutes, the returned error contains the original status code.
Click to show internal directories.
Click to hide internal directories.