Code Monkey home page Code Monkey logo

multisource-downloader's Introduction

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]

multisource-downloader's People

Contributors

gkatanacio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.