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

Method XREAD

streams.go:621–623  ·  view source on GitHub ↗

XREAD reads items sequentially from a stream. The structure of a stream guarantees that the XIDs are always increasing. This implies that calling XREAD in a loop and passing in the XID of the last item read will allow iteration over all items reliably. To start reading a stream from the beginning,

(key string, from XID, count int64)

Source from the content-addressed store, hash-verified

619//
620// Works similar to https://redis.io/commands/xread
621func (c Client) XREAD(key string, from XID, count int64) (items []StreamItem, err error) {
622 return c.XRANGE(key, from.Next(), XEnd, count)
623}
624
625type XReadOption string
626

Callers 1

TestStreamCRUFunction · 0.80

Calls 2

XRANGEMethod · 0.95
NextMethod · 0.80

Tested by 1

TestStreamCRUFunction · 0.64