MCPcopy
hub / github.com/dgraph-io/dgraph / marshalCountEntry

Function marshalCountEntry

dgraph/cmd/bulk/count_index.go:35–41  ·  view source on GitHub ↗
(dst, key []byte, uid uint64)

Source from the content-addressed store, hash-verified

33 return 8 + 4 + len(key)
34}
35func marshalCountEntry(dst, key []byte, uid uint64) {
36 binary.BigEndian.PutUint64(dst[0:8], uid)
37
38 binary.BigEndian.PutUint32(dst[8:12], uint32(len(key)))
39 n := copy(dst[12:], key)
40 x.AssertTrue(len(dst) == n+12)
41}
42func (ci countEntry) Uid() uint64 {
43 return binary.BigEndian.Uint64(ci[0:8])
44}

Callers 1

toListMethod · 0.85

Calls 2

AssertTrueFunction · 0.92
copyFunction · 0.85

Tested by

no test coverage detected