MCPcopy Create free account
hub / github.com/distributedio/titan / newSet

Function newSet

db/set.go:93–110  ·  view source on GitHub ↗

newSet create new Set object

(txn *Transaction, key []byte)

Source from the content-addressed store, hash-verified

91
92//newSet create new Set object
93func newSet(txn *Transaction, key []byte) *Set {
94 now := Now()
95 return &Set{
96 txn: txn,
97 key: key,
98 meta: &SetMeta{
99 Object: Object{
100 ID: UUID(),
101 CreatedAt: now,
102 UpdatedAt: now,
103 ExpireAt: 0,
104 Type: ObjectSet,
105 Encoding: ObjectEncodingHT,
106 },
107 Len: 0,
108 },
109 }
110}
111
112//encodeSetMeta encodes meta data into byte slice
113func encodeSetMeta(meta *SetMeta) []byte {

Callers 3

GetSetFunction · 0.85
setSetMetaFunction · 0.85
Test_newSetFunction · 0.85

Calls 2

NowFunction · 0.85
UUIDFunction · 0.85

Tested by 2

setSetMetaFunction · 0.68
Test_newSetFunction · 0.68