Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendStats ¶
func SendStats(prgChan StatsNotifChan, stats UpdateStats)
SendStats send stats of type UpdateStats on prgChan, but after first checking that the prgChan is not nil
Types ¶
type DownloadedParts ¶
type DownloadedParts struct { PartSize int64 // the maximum partition size Parts []*PartDefinition // definition of downloaded parts }
DownloadedParts keeps information about downloaded parts of blob
func (*DownloadedParts) Hash ¶
func (dp *DownloadedParts) Hash() string
Hash returns hash of DownloadedParts struct
func (*DownloadedParts) SetPartSize ¶
func (dp *DownloadedParts) SetPartSize(ind, size int64)
SetPartSize search for ind in DownloadedParts and set its size. If not found, append parts with ind and size
type Logger ¶
type Logger interface { Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Printf(format string, args ...interface{}) Warnf(format string, args ...interface{}) Warningf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Panicf(format string, args ...interface{}) Debug(args ...interface{}) Info(args ...interface{}) Print(args ...interface{}) Warn(args ...interface{}) Warning(args ...interface{}) Error(args ...interface{}) Fatal(args ...interface{}) Panic(args ...interface{}) Debugln(args ...interface{}) Infoln(args ...interface{}) Println(args ...interface{}) Warnln(args ...interface{}) Warningln(args ...interface{}) Errorln(args ...interface{}) Fatalln(args ...interface{}) Panicln(args ...interface{}) }
The Logger interface
type PartDefinition ¶
type PartDefinition struct { Ind int64 `json:"i"` // index of part Size int64 `json:"s"` // current size of part }
PartDefinition keeps information about one part
type StatsNotifChan ¶
type StatsNotifChan chan UpdateStats
StatsNotifChan channel to send UpdateStats
type UpdateStats ¶
type UpdateStats struct { Size int64 Asize int64 DoneParts DownloadedParts Error error }
UpdateStats standard structure for statistics that get sent on a notification channel during a data transfer operation
Click to show internal directories.
Click to hide internal directories.