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

Method XRANGE

streams.go:538–540  ·  view source on GitHub ↗

XRANGE fetches the stream records between two XIDs, inclusive of both the start and end IDs, limited to the count. If you receive the entire count you've asked for, it's reasonable to suppose there might be more items in the given range that were not returned because they would exceed the count – i

(key string, start, stop XID, count int64)

Source from the content-addressed store, hash-verified

536//
537// Works similar to https://redis.io/commands/xrange
538func (c Client) XRANGE(key string, start, stop XID, count int64) (streamItems []StreamItem, err error) {
539 return c.xRange(key, start, stop, count, true)
540}
541
542func (c Client) xRange(key string, start, stop XID, count int64, forward bool) (streamItems []StreamItem, err error) {
543 hasMoreResults := true

Callers 7

XCLAIMMethod · 0.95
XREADMethod · 0.95
xGroupReadPendingMethod · 0.95
XREADGROUPMethod · 0.95
TestStreamCRUFunction · 0.80
TestStreamDeletesFunction · 0.80
TestRangesFunction · 0.80

Calls 1

xRangeMethod · 0.95

Tested by 3

TestStreamCRUFunction · 0.64
TestStreamDeletesFunction · 0.64
TestRangesFunction · 0.64