MCPcopy
hub / github.com/containerd/containerd / writeInfo

Function writeInfo

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

Source from the content-addressed store, hash-verified

803}
804
805func writeInfo(info *content.Info, bkt *bolt.Bucket) error {
806 if err := boltutil.WriteTimestamps(bkt, info.CreatedAt, info.UpdatedAt); err != nil {
807 return err
808 }
809
810 if err := boltutil.WriteLabels(bkt, info.Labels); err != nil {
811 return fmt.Errorf("writing labels for info %v: %w", info.Digest, err)
812 }
813
814 // Write size
815 sizeEncoded, err := encodeInt(info.Size)
816 if err != nil {
817 return err
818 }
819
820 return bkt.Put(bucketKeySize, sizeEncoded)
821}
822
823func readExpireAt(bkt *bolt.Bucket) (*time.Time, error) {
824 v := bkt.Get(bucketKeyExpireAt)

Callers 1

UpdateMethod · 0.85

Calls 4

WriteTimestampsFunction · 0.92
WriteLabelsFunction · 0.92
encodeIntFunction · 0.85
PutMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…