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

Function WithDescriptor

core/content/content.go:204–209  ·  view source on GitHub ↗

WithDescriptor specifies an OCI descriptor. Writer may optionally use the descriptor internally for resolving the location of the actual data. Write does not require any field of desc to be set. If the data size is unknown, desc.Size should be set to 0. Some implementations may also accept negative

(desc ocispec.Descriptor)

Source from the content-addressed store, hash-verified

202// If the data size is unknown, desc.Size should be set to 0.
203// Some implementations may also accept negative values as "unknown".
204func WithDescriptor(desc ocispec.Descriptor) WriterOpt {
205 return func(opts *WriterOpts) error {
206 opts.Desc = desc
207 return nil
208 }
209}
210
211// WithRef specifies a ref string.
212func WithRef(ref string) WriterOpt {

Callers 15

FuzzContentStoreFunction · 0.92
FetchFunction · 0.92
pushFunction · 0.92
tryUploadFunction · 0.92
createFunction · 0.92
WriterMethod · 0.92
createAndCopyMethod · 0.92
TestContentLeasedFunction · 0.92
TestIngestLeasedFunction · 0.92
PushMethod · 0.92
checkContentStoreWriterFunction · 0.92

Calls

no outgoing calls

Tested by 10

FuzzContentStoreFunction · 0.74
tryUploadFunction · 0.74
createFunction · 0.74
TestContentLeasedFunction · 0.74
TestIngestLeasedFunction · 0.74
setupIncompleteWriteFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…