MCPcopy
hub / github.com/hashicorp/go-getter / ProgressTracker

Interface ProgressTracker

client_option_progress.go:8–26  ·  view source on GitHub ↗

ProgressTracker allows to track the progress of downloads.

Source from the content-addressed store, hash-verified

6
7// ProgressTracker allows to track the progress of downloads.
8type ProgressTracker interface {
9 // TrackProgress should be called when
10 // a new object is being downloaded.
11 // src is the location the file is
12 // downloaded from.
13 // currentSize is the current size of
14 // the file in case it is a partial
15 // download.
16 // totalSize is the total size in bytes,
17 // size can be zero if the file size
18 // is not known.
19 // stream is the file being downloaded, every
20 // written byte will add up to processed size.
21 //
22 // TrackProgress returns a ReadCloser that wraps the
23 // download in progress ( stream ).
24 // When the download is finished, body shall be closed.
25 TrackProgress(src string, currentSize, totalSize int64, stream io.ReadCloser) (body io.ReadCloser)
26}

Callers 1

GetFileMethod · 0.65

Implementers 2

MockProgressTrackingclient_option_progress_test.go
ProgressBarcmd/go-getter/progress_tracking.go

Calls

no outgoing calls

Tested by

no test coverage detected