Class: Hivent::Redis::Producer
- Inherits:
-
Object
- Object
- Hivent::Redis::Producer
- Includes:
- Extensions
- Defined in:
- lib/hivent/redis/producer.rb
Constant Summary collapse
- LUA_PRODUCER =
File.("../lua/producer.lua", __FILE__)
Constants included from Extensions
Instance Method Summary collapse
-
#initialize(redis) ⇒ Producer
constructor
A new instance of Producer.
- #write(name, payload, partition_key) ⇒ Object
Methods included from Extensions
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 |