MCPcopy
hub / github.com/containerd/containerd / checkWrite

Function checkWrite

contrib/fuzz/content_fuzz_test.go:73–79  ·  view source on GitHub ↗

checkWrite is a wrapper around content.WriteBlob()

(ctx context.Context, cs content.Store, dgst digest.Digest, p []byte)

Source from the content-addressed store, hash-verified

71
72// checkWrite is a wrapper around content.WriteBlob()
73func checkWrite(ctx context.Context, cs content.Store, dgst digest.Digest, p []byte) (digest.Digest, error) {
74 if err := content.WriteBlob(ctx, cs, dgst.String(), bytes.NewReader(p),
75 ocispec.Descriptor{Size: int64(len(p)), Digest: dgst}); err != nil {
76 return dgst, err
77 }
78 return dgst, nil
79}
80
81// populateBlobStore creates a bunch of blobs
82func populateBlobStore(ctx context.Context, cs content.Store, f *fuzz.ConsumeFuzzer) (map[digest.Digest][]byte, error) {

Callers 2

populateBlobStoreFunction · 0.70
checkResumeWriterFunction · 0.50

Calls 2

WriteBlobFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…