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

Method Info

core/metadata/content.go:72–92  ·  view source on GitHub ↗
(ctx context.Context, dgst digest.Digest)

Source from the content-addressed store, hash-verified

70}
71
72func (cs *contentStore) Info(ctx context.Context, dgst digest.Digest) (content.Info, error) {
73 ns, err := namespaces.NamespaceRequired(ctx)
74 if err != nil {
75 return content.Info{}, err
76 }
77
78 var info content.Info
79 if err := view(ctx, cs.db, func(tx *bolt.Tx) error {
80 bkt := getBlobBucket(tx, ns, dgst)
81 if bkt == nil {
82 return fmt.Errorf("content digest %v: %w", dgst, errdefs.ErrNotFound)
83 }
84
85 info.Digest = dgst
86 return readInfo(&info, bkt)
87 }); err != nil {
88 return content.Info{}, err
89 }
90
91 return info, nil
92}
93
94func (cs *contentStore) Update(ctx context.Context, info content.Info, fieldpaths ...string) (content.Info, error) {
95 ns, err := namespaces.NamespaceRequired(ctx)

Callers

nothing calls this directly

Calls 4

NamespaceRequiredFunction · 0.92
getBlobBucketFunction · 0.85
readInfoFunction · 0.85
viewFunction · 0.70

Tested by

no test coverage detected