MCPcopy Create free account
hub / github.com/containerd/containerd / Status

Method Status

core/metadata/content.go:306–330  ·  view source on GitHub ↗
(ctx context.Context, ref string)

Source from the content-addressed store, hash-verified

304}
305
306func (cs *contentStore) Status(ctx context.Context, ref string) (content.Status, error) {
307 ns, err := namespaces.NamespaceRequired(ctx)
308 if err != nil {
309 return content.Status{}, err
310 }
311
312 var bref string
313 if err := view(ctx, cs.db, func(tx *bolt.Tx) error {
314 bref = getRef(tx, ns, ref)
315 if bref == "" {
316 return fmt.Errorf("reference %v: %w", ref, errdefs.ErrNotFound)
317 }
318
319 return nil
320 }); err != nil {
321 return content.Status{}, err
322 }
323
324 st, err := cs.Store.Status(ctx, bref)
325 if err != nil {
326 return content.Status{}, err
327 }
328 st.Ref = ref
329 return st, nil
330}
331
332func (cs *contentStore) Abort(ctx context.Context, ref string) error {
333 ns, err := namespaces.NamespaceRequired(ctx)

Callers

nothing calls this directly

Calls 4

NamespaceRequiredFunction · 0.92
getRefFunction · 0.85
viewFunction · 0.70
StatusMethod · 0.65

Tested by

no test coverage detected