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

Function readInfo

core/metadata/content.go:787–803  ·  view source on GitHub ↗
(info *content.Info, bkt *bolt.Bucket)

Source from the content-addressed store, hash-verified

785}
786
787func readInfo(info *content.Info, bkt *bolt.Bucket) error {
788 if err := boltutil.ReadTimestamps(bkt, &info.CreatedAt, &info.UpdatedAt); err != nil {
789 return err
790 }
791
792 labels, err := boltutil.ReadLabels(bkt)
793 if err != nil {
794 return err
795 }
796 info.Labels = labels
797
798 if v := bkt.Get(bucketKeySize); len(v) > 0 {
799 info.Size, _ = binary.Varint(v)
800 }
801
802 return nil
803}
804
805func writeInfo(info *content.Info, bkt *bolt.Bucket) error {
806 if err := boltutil.WriteTimestamps(bkt, info.CreatedAt, info.UpdatedAt); err != nil {

Callers 3

InfoMethod · 0.85
UpdateMethod · 0.85
WalkMethod · 0.85

Calls 3

ReadTimestampsFunction · 0.92
ReadLabelsFunction · 0.92
GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…