Documentation
¶
Overview ¶
Copyright 2020 Cosmos Nicolaou. All rights reserved. Use of this source code is governed by the Apache-2.0 license that can be found in the LICENSE file.
Copyright 2020 Cosmos Nicolaou. All rights reserved. Use of this source code is governed by the Apache-2.0 license that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader represents a concurrent, streaming, http downloader.
func New ¶
func New(ctx context.Context, url string, opts ...Option) *Downloader
New returns a new instance of Downloader.
func (*Downloader) ContentLength ¶
func (dl *Downloader) ContentLength() int64
ContentLength returns the content length header for the file being downloaded.
func (*Downloader) Finish ¶
func (dl *Downloader) Finish()
type Option ¶
type Option func(*options)
Option represen ts an option to NewDownloader.
func Concurrency ¶
Concurrency sets the degree of concurrency to use, that is, the number of download threads.
func SendUpdates ¶
SendUpdates enables sending progreess updates to the specified channel.