MCPcopy Create free account
hub / github.com/dbProjectRED/redimo.go / NewTimeXID

Function NewTimeXID

streams.go:48–50  ·  view source on GitHub ↗

NewTimeXID creates an XID with the given timestamp. To get the first or the last XID in this timestamp, use the First() or the Last() methods. This is especially important when using constructed XIDs inside a range call like XRANGE or XREVRANGE.

(ts time.Time)

Source from the content-addressed store, hash-verified

46// XID in this timestamp, use the First() or the Last() methods. This is especially
47// important when using constructed XIDs inside a range call like XRANGE or XREVRANGE.
48func NewTimeXID(ts time.Time) XID {
49 return NewXID(ts, 0)
50}
51
52func (xid XID) String() string {
53 return string(xid)

Callers 1

TestXIDGenerationFunction · 0.85

Calls 1

NewXIDFunction · 0.85

Tested by 1

TestXIDGenerationFunction · 0.68