restore

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	Files uint
	Bytes uint64
}

type ProgressPrinter

type ProgressPrinter interface {
	Update(total, s Counter, avgSpeed uint64, errors uint, start time.Time, secs uint64)
	Error(item string, err error) error
	ScannerError(err error) error
	ReportTotal(start time.Time, total Counter)
	Finish(snapshotID string, start time.Time, summary *Counter)
}

type RestoreProgress

type RestoreProgress struct {
	MinUpdatePause time.Duration
	// contains filtered or unexported fields
}

func NewProgress

func NewProgress(printer ProgressPrinter) *RestoreProgress

func (*RestoreProgress) CompleteItem

func (p *RestoreProgress) CompleteItem(item string, s archiver.ScanStats)

func (*RestoreProgress) Error

func (p *RestoreProgress) Error(item string, err error) error

func (*RestoreProgress) Finish

func (p *RestoreProgress) Finish(snapshotID string)

func (*RestoreProgress) ReportTotal

func (p *RestoreProgress) ReportTotal(item string, s Stats)

func (*RestoreProgress) Run

func (p *RestoreProgress) Run(ctx context.Context) error

func (*RestoreProgress) ScannerError

func (p *RestoreProgress) ScannerError(err error) error

func (*RestoreProgress) SetMinUpdatePause

func (p *RestoreProgress) SetMinUpdatePause(d time.Duration)

type RestoreProgressReporter

type RestoreProgressReporter interface {
	CompleteItem(item string, s archiver.ScanStats)
	ScannerError(err error) error
	Error(item string, err error) error
	ReportTotal(item string, total Stats)
	SetMinUpdatePause(d time.Duration)
	Run(ctx context.Context) error
	Finish(snapshotID string)
}

type Stats

type Stats struct {
	TotalSize      uint64
	TotalFileCount uint
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL