downloader

package
v0.0.0-...-36f5a7c Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package downloader implements methods for downloading a file in parallel from a single source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(ctx context.Context, params DownloadParams, logger logger.Logger) (string, error)

DownloadFile downloads a file using the specified parameters and logs events with the given logger. It returns the file name and any error encountered.

Types

type DownloadParams

type DownloadParams struct {
	URL            string
	FileExtension  string
	ChunkSize      int
	MaxRetries     int
	NumberOfChunks int
}

DownloadParams defines the parameters needed for the download operation.

Jump to

Keyboard shortcuts

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