Class: RedisStream::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/redis_stream/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(redis) ⇒ Client

Returns a new instance of Client.



3
4
5
# File 'lib/redis_stream/client.rb', line 3

def initialize(redis)
  @redis = redis
end

Instance Method Details

#group(key:, name:) ⇒ Object



11
12
13
14
# File 'lib/redis_stream/client.rb', line 11

def group(key:, name:)
  new_group = Group.new(redis: @redis, key: key, name: name)
  new_group.create
end

#stream(key) ⇒ Object



7
8
9
# File 'lib/redis_stream/client.rb', line 7

def stream(key)
  Stream.new(redis: @redis, key: key)
end