downloader

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFileConcurrently

func DownloadFileConcurrently(ctx context.Context, filepath string, url string, headers map[string]string, concurrency int) (int64, error)

DownloadFileConcurrently download file in chunks, return total file size

Types

type Part

type Part struct {
	Data  []byte
	Index int
}

Part use this struct as a channel type. The struct will have 2 fields. One for housing data and the other specifying its location within the final file.

Jump to

Keyboard shortcuts

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