Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultMinSplitSize = 10 * 1024 * 1024 DefaultMinSplitSizeFormatted = "10 MiB" DefaultConnectTimeout = 1 * time.Minute DefaultTransferTimeout = 20 * time.Second DefaultMaxConnections = 3 DefaultAutoSaveControl = 15 * time.Second DefaultRetryDelay = 2 * time.Second DefaultMaxRetries = 0 )
Variables ¶
View Source
var C = &Config{ MaxLogLevel: LogNone, ProgressLevel: ProgressNone, Force: false, Preallocate: true, ConnectTimeout: DefaultConnectTimeout, TransferTimeout: DefaultTransferTimeout, Resume: true, AutoSaveControl: DefaultAutoSaveControl, RetryDelay: DefaultRetryDelay, MaxRetries: DefaultMaxRetries, DownloadDir: "./", DownloadName: "", MinSplitSize: DefaultMinSplitSize, MaxConnections: DefaultMaxConnections, }
View Source
var Version string
View Source
var WG = &sync.WaitGroup{}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MaxLogLevel LogLevel Debug bool ProgressLevel ProgressLevel TaskWidth int TaskFormat string Force bool Preallocate bool ConnectTimeout time.Duration TransferTimeout time.Duration Resume bool AutoSaveControl time.Duration RetryDelay time.Duration MaxRetries int DownloadDir string DownloadName string MinSplitSize int64 MaxConnections int64 UserAgent string UserAgentExtra string }
func (*Config) SetUserAgent ¶ added in v0.1.3
func (c *Config) SetUserAgent()
type ProgressLevel ¶
type ProgressLevel int
const ( ProgressNone ProgressLevel = iota ProgressStatic ProgressDynamic )
Click to show internal directories.
Click to hide internal directories.