MCPcopy
hub / github.com/moby/moby / CloseWithError

Method CloseWithError

daemon/internal/stream/bytespipe/bytespipe.go:107–117  ·  view source on GitHub ↗

CloseWithError causes further reads from a BytesPipe to return immediately.

(err error)

Source from the content-addressed store, hash-verified

105
106// CloseWithError causes further reads from a BytesPipe to return immediately.
107func (bp *BytesPipe) CloseWithError(err error) error {
108 bp.mu.Lock()
109 if err != nil {
110 bp.closeErr = err
111 } else {
112 bp.closeErr = io.EOF
113 }
114 bp.wait.Broadcast()
115 bp.mu.Unlock()
116 return nil
117}
118
119// Close causes further reads from a BytesPipe to return immediately.
120func (bp *BytesPipe) Close() error {

Callers 11

CloseMethod · 0.95
PluginInstallMethod · 0.80
closeWithErrorMethod · 0.80
ReadLogsMethod · 0.80
writeCompressedBlobFunction · 0.80
compressAndWriteBlobFunction · 0.80
exportLayerMethod · 0.80
splitConfigRootFSFromTarFunction · 0.80
compressFunction · 0.80
getTarStreamMethod · 0.80
pullImageMethod · 0.80

Calls 2

UnlockMethod · 0.80
LockMethod · 0.45

Tested by 1

ReadLogsMethod · 0.64