gprogress

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ConsumedBytes int64
	TotalBytes    int64
	RwBytes       int64
	EventType     EventType
}

Event defines progress event

type EventType

type EventType int
const (
	// TransferStartedEvent transfer started, set TotalBytes
	TransferStartedEvent EventType = 1 + iota
	// TransferDataEvent transfer data, set ConsumedBytes anmd TotalBytes
	TransferDataEvent
	// TransferCompletedEvent transfer completed
	TransferCompletedEvent
	// TransferFailedEvent transfer encounters an error
	TransferFailedEvent
)

type Listener

type Listener interface {
	ProgressChanged(event *Event)
}

Listener listens progress change

Jump to

Keyboard shortcuts

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