Redis::Streaming::XReadResponse
Inherits Enumerable < Struct < Value < Object
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
Constructors
Instance methods
[](stream_name : String) : Array(Message)
Source[]?(stream_name : String) : Array(Message) | Nil
Sourcedig(stream_name : String, *rest)
Sourceeach(*args, **options)
Sourceeach(*args, **options, &)
Source