MCPcopy
hub / github.com/containerd/containerd / Write

Method Write

core/metadata/content.go:524–537  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

522}
523
524func (nw *namespacedWriter) Write(p []byte) (int, error) {
525 // if no writer, first copy and unshare before performing write
526 if nw.w == nil {
527 if len(p) == 0 {
528 return 0, nil
529 }
530
531 if err := nw.createAndCopy(nw.ctx, nw.desc); err != nil {
532 return 0, err
533 }
534 }
535
536 return nw.w.Write(p)
537}
538
539func (nw *namespacedWriter) Digest() digest.Digest {
540 if nw.w != nil {

Callers

nothing calls this directly

Calls 2

createAndCopyMethod · 0.95
WriteMethod · 0.65

Tested by

no test coverage detected