Class: Hivent::Redis::Producer

Inherits:
Object
  • Object
show all
Includes:
Extensions
Defined in:
lib/hivent/redis/producer.rb

Constant Summary collapse

LUA_PRODUCER =
File.expand_path("../lua/producer.lua", __FILE__)

Constants included from Extensions

Extensions::LUA_CACHE

Instance Method Summary collapse

Methods included from Extensions

#script

Constructor Details

#initialize(redis) ⇒ Producer

Returns a new instance of Producer.



12
13
14
# File 'lib/hivent/redis/producer.rb', line 12

def initialize(redis)
  @redis = redis
end

Instance Method Details

#write(name, payload, partition_key) ⇒ Object



16
17
18
# File 'lib/hivent/redis/producer.rb', line 16

def write(name, payload, partition_key)
  script(LUA_PRODUCER, name, payload, partition_key)
end