struct
Redis::Streaming::XReadResponse
- Redis::Streaming::XReadResponse
- Struct
- Value
- Object
Overview
The XReadResponse is a convenience object that you can pass the result
of a Commands#xread call to. Traversing nested Array(Redis::Value)
structures isn't a great experience, so we provide these objects to make
it easier to work with.
if response = redis.xread(streams: {my_stream: "0"})
Redis::Streaming::XReadResponse.new(response).each do |stream, messages|
messages.each do |msg|
# ...
end
end
end
Included Modules
- Enumerable({String, Array(Redis::Streaming::Message)})
Defined in:
streaming.crConstructors
Instance Method Summary
- #[](stream_name : String) : Array(Message)
- #[]?(stream_name : String) : Array(Message) | Nil
- #dig(stream_name : String, *rest)
- #each(*args, **options)
- #each(*args, **options, &)