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

Method toBackupKey

worker/backup.go:793–802  ·  view source on GitHub ↗
(key []byte)

Source from the content-addressed store, hash-verified

791}
792
793func (tl *threadLocal) toBackupKey(key []byte) ([]byte, error) {
794 parsedKey, err := x.Parse(key)
795 if err != nil {
796 return nil, errors.Wrapf(err, "could not parse key %s", hex.Dump(key))
797 }
798 bk := parsedKey.ToBackupKey()
799
800 out := tl.alloc.Allocate(proto.Size(bk))
801 return x.MarshalToSizedBuffer(out, bk)
802}
803
804func writeKVList(list *bpb.KVList, w io.Writer) error {
805 if err := binary.Write(w, binary.LittleEndian, uint64(proto.Size(list))); err != nil {

Callers 2

WriteBackupMethod · 0.95
toBackupListMethod · 0.95

Calls 4

ParseFunction · 0.92
MarshalToSizedBufferFunction · 0.92
ToBackupKeyMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected