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

Function getObject

plugins/snapshots/devmapper/metadata.go:359–372  ·  view source on GitHub ↗
(bucket *bolt.Bucket, key string, obj any)

Source from the content-addressed store, hash-verified

357}
358
359func getObject(bucket *bolt.Bucket, key string, obj any) error {
360 data := bucket.Get([]byte(key))
361 if data == nil {
362 return ErrNotFound
363 }
364
365 if obj != nil {
366 if err := json.Unmarshal(data, obj); err != nil {
367 return fmt.Errorf("failed to unmarshal object with key %q: %w", key, err)
368 }
369 }
370
371 return nil
372}

Callers 5

AddDeviceMethod · 0.85
MarkFaultyMethod · 0.85
UpdateDeviceMethod · 0.85
GetDeviceMethod · 0.85
RemoveDeviceMethod · 0.85

Calls 2

UnmarshalMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…