You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// given a containerd content store, an io/fs reference to an "OCI image layout", and an OCI descriptor, import the given blob into the content store (with appropriate validation)
// explicitly "abort" the ref we're about to use in case there's a partial or failed ingest already (which content.WriteBlob will then quietly reuse, over and over)
76
+
_=cs.Abort(ctx, ingestRef)
77
+
73
78
// WriteBlob does *not* limit reads to the provided size, so let's wrap ourselves in a LimitedReader to prevent reading (much) more than we intend
74
79
r:=io.LimitReader(
75
80
blob,
76
81
descriptor.Size+1, // +1 to allow WriteBlob to detect if it reads too much
77
82
)
78
83
79
84
// WriteBlob verifies the digest and the size while ingesting
0 commit comments