restore

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Progress

type Progress struct {
	// contains filtered or unexported fields
}

func NewProgress

func NewProgress(printer ProgressPrinter, interval time.Duration) *Progress

func (*Progress) AddFile

func (p *Progress) AddFile(size uint64)

AddFile starts tracking a new file with the given size

func (*Progress) AddProgress

func (p *Progress) AddProgress(name string, bytesWrittenPortion uint64, bytesTotal uint64)

AddProgress accumulates the number of bytes written for a file

func (*Progress) Finish

func (p *Progress) Finish()

type ProgressPrinter

type ProgressPrinter interface {
	Update(filesFinished, filesTotal, allBytesWritten, allBytesTotal uint64, duration time.Duration)
	Finish(filesFinished, filesTotal, allBytesWritten, allBytesTotal uint64, duration time.Duration)
}

func NewJSONProgress

func NewJSONProgress(terminal term) ProgressPrinter

func NewTextProgress

func NewTextProgress(terminal term) ProgressPrinter

Jump to

Keyboard shortcuts

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