MCPcopy
hub / github.com/containerd/containerd / Flush

Method Flush

pkg/progress/writer.go:57–73  ·  view source on GitHub ↗

Flush should be called when refreshing the current display.

()

Source from the content-addressed store, hash-verified

55
56// Flush should be called when refreshing the current display.
57func (w *Writer) Flush() error {
58 if w.buf.Len() == 0 {
59 return nil
60 }
61
62 if err := w.clearLines(); err != nil {
63 return err
64 }
65 w.lines = countLines(w.buf.String())
66
67 if _, err := w.w.Write(w.buf.Bytes()); err != nil {
68 return err
69 }
70
71 w.buf.Reset()
72 return nil
73}
74
75// TODO(stevvooe): The following are system specific. Break these out if we
76// decide to build this package further.

Callers 15

checkNodesEqualFunction · 0.95
ShowProgressFunction · 0.95
snapshots.goFile · 0.80
leases.goFile · 0.80
namespaces.goFile · 0.80
sandboxes.goFile · 0.80
containers.goFile · 0.80
metrics.goFile · 0.80
ps.goFile · 0.80
list.goFile · 0.80
content.goFile · 0.80
plugins.goFile · 0.80

Implementers 5

pushWritercore/remotes/docker/pusher.go
namespacedWritercore/metadata/content.go
fakeWritercore/content/helpers_test.go
remoteWritercore/content/proxy/content_writer.go
writerplugins/content/local/writer.go

Calls 7

clearLinesMethod · 0.95
countLinesFunction · 0.85
WriteMethod · 0.65
BytesMethod · 0.65
ResetMethod · 0.65
LenMethod · 0.45
StringMethod · 0.45

Tested by 1

checkNodesEqualFunction · 0.76