MCPcopy Index your code
hub / github.com/moby/moby / NewProgressReader

Function NewProgressReader

daemon/internal/progress/progressreader.go:23–32  ·  view source on GitHub ↗

NewProgressReader creates a new ProgressReader.

(in io.ReadCloser, out Output, size int64, id, action string)

Source from the content-addressed store, hash-verified

21
22// NewProgressReader creates a new ProgressReader.
23func NewProgressReader(in io.ReadCloser, out Output, size int64, id, action string) *Reader {
24 return &Reader{
25 in: in,
26 out: out,
27 size: size,
28 id: id,
29 action: action,
30 rateLimiter: rate.NewLimiter(rate.Every(100*time.Millisecond), 1),
31 }
32}
33
34func (p *Reader) Read(buf []byte) (int, error) {
35 read, err := p.in.Read(buf)

Callers 9

applyLayerFunction · 0.92
loadLayerMethod · 0.92
uploadUsingSessionMethod · 0.92
DownloadMethod · 0.92
makeDownloadFuncMethod · 0.92
postImagesCreateMethod · 0.92
downloadSourceFunction · 0.92
TestCompleteSilentlyFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestCompleteSilentlyFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…