terminal

package
v0.0.0-...-81c1a03 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoOpProgress

type NoOpProgress struct{}

A NoOpProgress doesn't report progress to a terminal.

func (NoOpProgress) FileHook

func (NoOpProgress) FinishUpload

func (NoOpProgress) FinishUpload(Upload)

func (NoOpProgress) RunUpload

func (NoOpProgress) RunUpload(context.Context, Upload)

type Progress

type Progress interface {
	FileHook(os.FileInfo, transfer.FileOperation, *uint64, error)
	RunUpload(context.Context, Upload)
	FinishUpload(Upload)
}

func NewProgress

func NewProgress(w io.Writer, period time.Duration) Progress

NewProgress creates a new progress reporter. If the writer is not a terminal, progress reporting is disabled.

type Upload

type Upload interface {
	Stats() transfer.UploadStats
}

Jump to

Keyboard shortcuts

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