Progress when downloading single files and when parsing remote mirrors.

This commit is contained in:
Andrey Smirnov
2014-03-07 00:37:06 +04:00
parent 04d6603f38
commit 74c88f3ef6
5 changed files with 37 additions and 0 deletions
+4
View File
@@ -54,6 +54,8 @@ type Progress interface {
ShutdownBar()
// AddBar increments progress for progress bar
AddBar(count int)
// SetBar sets current position for progress bar
SetBar(count int)
// Printf does printf but in safe manner: not overwriting progress bar
Printf(msg string, a ...interface{})
// ColoredPrintf does printf in colored way + newline
@@ -73,4 +75,6 @@ type Downloader interface {
// Shutdown stops downloader after current tasks are finished,
// but doesn't process rest of queue
Shutdown()
// GetProgress returns Progress object
GetProgress() Progress
}