MCPcopy
hub / github.com/containerd/containerd / decodeIndex

Function decodeIndex

client/client.go:634–645  ·  view source on GitHub ↗
(ctx context.Context, store content.Provider, desc ocispec.Descriptor)

Source from the content-addressed store, hash-verified

632}
633
634func decodeIndex(ctx context.Context, store content.Provider, desc ocispec.Descriptor) (*ocispec.Index, error) {
635 var index ocispec.Index
636 p, err := content.ReadBlob(ctx, store, desc)
637 if err != nil {
638 return nil, err
639 }
640 if err := json.Unmarshal(p, &index); err != nil {
641 return nil, err
642 }
643
644 return &index, nil
645}
646
647// GetLabel gets a label value from namespace store
648// If there is no default label, an empty string returned with nil error

Callers 3

ImportMethod · 0.85
WithTaskCheckpointFunction · 0.85
RestoreMethod · 0.85

Calls 2

ReadBlobFunction · 0.92
UnmarshalMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…