MCPcopy Index your code
hub / github.com/containerd/containerd / CloseWithError

Method CloseWithError

core/remotes/docker/fetcher.go:166–175  ·  view source on GitHub ↗

CloseWithError closes the reader; subsequent writes to the write half of the pipe will return the error err.

(err error)

Source from the content-addressed store, hash-verified

164// CloseWithError closes the reader; subsequent writes to the write half of the
165// pipe will return the error err.
166func (r *pipeReader) CloseWithError(err error) error {
167 r.cond.L.Lock()
168 defer r.cond.L.Unlock()
169
170 if err == nil {
171 err = ErrClosedPipe
172 }
173 r.werr = err
174 return nil
175}
176
177// Write implements the standard Write interface: it writes data to the internal
178// buffer. If the read end is closed with an error, that err is returned as err;

Callers 8

CloseMethod · 0.95
openMethod · 0.45
replacePipeMethod · 0.45
ReceiveStreamFunction · 0.45
DiffFunction · 0.45
TarFromWriterToFunction · 0.45
cmdStreamFunction · 0.45

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected