MCPcopy Create free account
hub / github.com/containers/image / GetBlob

Method GetBlob

types/types.go:267–267  ·  view source on GitHub ↗

GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown). The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided. May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a s

(context.Context, BlobInfo, BlobInfoCache)

Source from the content-addressed store, hash-verified

265 // WARNING: This is a raw access to the data as provided by the source; callers must validate the contents
266 // against the blob’s digest themselves. (Compare the generic warning applicable to all of the [ImageSource] interface.)
267 GetBlob(context.Context, BlobInfo, BlobInfoCache) (io.ReadCloser, int64, error)
268 // HasThreadSafeGetBlob indicates whether GetBlob can be executed concurrently.
269 HasThreadSafeGetBlob() bool
270 // GetSignatures returns the image's signatures. It may use a remote (= slow) service.

Callers 12

TestWriteReadFunction · 0.95
TestGetPutBlobFunction · 0.95
copyLayerMethod · 0.65
GetBlobMethod · 0.65
GetBlobMethod · 0.65
ConfigBlobMethod · 0.65
ConfigBlobMethod · 0.65
GetBlobMethod · 0.65
GetBlobMethod · 0.65

Implementers 1

ForbiddenImageSourceinternal/testing/mocks/image_source.go

Calls

no outgoing calls

Tested by 5

TestWriteReadFunction · 0.76
TestGetPutBlobFunction · 0.76