forked from TrueCloudLab/restic
ui/backup: Remove unused ProgressReporter type, Progress field
This commit is contained in:
parent
d4aadfa389
commit
6922360179
1 changed files with 1 additions and 17 deletions
|
@ -39,18 +39,6 @@ type fileWorkerMessage struct {
|
||||||
done bool
|
done bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProgressReporter interface {
|
|
||||||
CompleteItem(item string, previous, current *restic.Node, s archiver.ItemStats, d time.Duration)
|
|
||||||
StartFile(filename string)
|
|
||||||
CompleteBlob(filename string, bytes uint64)
|
|
||||||
ScannerError(item string, err error) error
|
|
||||||
ReportTotal(item string, s archiver.ScanStats)
|
|
||||||
SetMinUpdatePause(d time.Duration)
|
|
||||||
Run(ctx context.Context) error
|
|
||||||
Error(item string, err error) error
|
|
||||||
Finish(snapshotID restic.ID)
|
|
||||||
}
|
|
||||||
|
|
||||||
type Summary struct {
|
type Summary struct {
|
||||||
sync.Mutex
|
sync.Mutex
|
||||||
Files, Dirs struct {
|
Files, Dirs struct {
|
||||||
|
@ -69,8 +57,6 @@ type Progress struct {
|
||||||
start time.Time
|
start time.Time
|
||||||
dry bool
|
dry bool
|
||||||
|
|
||||||
totalBytes uint64
|
|
||||||
|
|
||||||
totalCh chan Counter
|
totalCh chan Counter
|
||||||
processedCh chan Counter
|
processedCh chan Counter
|
||||||
errCh chan struct{}
|
errCh chan struct{}
|
||||||
|
@ -130,7 +116,6 @@ func (p *Progress) Run(ctx context.Context) error {
|
||||||
} else {
|
} else {
|
||||||
// scan has finished
|
// scan has finished
|
||||||
p.totalCh = nil
|
p.totalCh = nil
|
||||||
p.totalBytes = total.Bytes
|
|
||||||
}
|
}
|
||||||
case s := <-p.processedCh:
|
case s := <-p.processedCh:
|
||||||
processed.Files += s.Files
|
processed.Files += s.Files
|
||||||
|
@ -312,8 +297,7 @@ func (p *Progress) Finish(snapshotID restic.ID) {
|
||||||
p.printer.Finish(snapshotID, p.start, p.summary, p.dry)
|
p.printer.Finish(snapshotID, p.start, p.summary, p.dry)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetMinUpdatePause sets b.MinUpdatePause. It satisfies the
|
// SetMinUpdatePause sets b.MinUpdatePause.
|
||||||
// ArchiveProgressReporter interface.
|
|
||||||
func (p *Progress) SetMinUpdatePause(d time.Duration) {
|
func (p *Progress) SetMinUpdatePause(d time.Duration) {
|
||||||
p.MinUpdatePause = d
|
p.MinUpdatePause = d
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue