Class: Drnbench::PublishSubscribe::Watch

Inherits:
Object
  • Object
show all
Defined in:
lib/drnbench/publish-subscribe/watch.rb

Class Method Summary collapse

Class Method Details

.commandObject



22
23
24
# File 'lib/drnbench/publish-subscribe/watch.rb', line 22

def command
  "watch"
end

.feed(keyword) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/drnbench/publish-subscribe/watch.rb', line 33

def feed(keyword)
  {
    "targets" => {
      "keyword"  => keyword,
    },
  }
end

.subscribe(keyword) ⇒ Object



26
27
28
29
30
31
# File 'lib/drnbench/publish-subscribe/watch.rb', line 26

def subscribe(keyword)
  {
    "condition" => keyword,
    "subscriber" => "subscriber for #{keyword}",
  }
end