multisource-downloader

command module
v0.0.0-...-7c3525c Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 1 Imported by: 0

README

multisource-downloader

Download accelerator that supports fetching a file from multiple sources concurrently.

Prerequisites

i.e., no need to have Go installed locally

Usage

Make targets
tidy dependencies
$ make deps
format all .go files in project
$ make fmt
run tests
$ make test
build executable binary
$ make build target={target OS}
  • generates msdl inside bin/ directory
  • possible values for target can be found here
  • example: make build target=linux
CLI reference

Running msdl (after generating it using make build):

synopsis

msdl [flags...] [space-delimited URLs...]

example
$ ./msdl -f destfile.txt http://source1.com/a.txt http://source2.com/a.txt http://source3.com/a.txt
  • downloads a.txt from 3 different sources concurrently and saves it to a local file named destfile.txt
  • note: the filenames can be different in the sources as long as they are effectively the same file
available flags
-c, --connections uint   max number of concurrent connections [optional; default 5]
    --etag               check ETag match (using MD5 hash of downloaded file) if available [optional; default false]
-f, --file string        destination file path [required for download]
-h, --help               help for msdl
-q, --quiet              disable logging to stdout [optional; default false]
-t, --timeout uint       timeout for each connection in seconds [optional; default 10]

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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