MCPcopy
hub / github.com/containerd/containerd / parentKey

Function parentKey

core/snapshots/storage/bolt.go:54–59  ·  view source on GitHub ↗

parentKey returns a composite key of the parent and child identifiers. The parts of the key are separated by a zero byte.

(parent, child uint64)

Source from the content-addressed store, hash-verified

52// parentKey returns a composite key of the parent and child identifiers. The
53// parts of the key are separated by a zero byte.
54func parentKey(parent, child uint64) []byte {
55 b := make([]byte, binary.Size([]uint64{parent, child})+1)
56 i := binary.PutUvarint(b, parent)
57 j := binary.PutUvarint(b[i+1:], child)
58 return b[0 : i+j+1]
59}
60
61// parentPrefixKey returns the parent part of the composite key with the
62// zero byte separator.

Callers 3

CreateSnapshotFunction · 0.85
RemoveFunction · 0.85
CommitActiveFunction · 0.85

Calls 1

SizeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…