class App::Helpers::SSE::Streamer

Public Class Methods

new(out) click to toggle source
# File app/helpers/sse.rb, line 9
def initialize(out)
  @out = out
end

Public Instance Methods

host_down(host) click to toggle source
# File app/helpers/sse.rb, line 21
def host_down(host)
  @out << "event: host_down\ndata: #{json_dump(host)}\n\n"
end
host_found(host) click to toggle source
# File app/helpers/sse.rb, line 13
def host_found(host)
  @out << "event: host_found\ndata: #{json_dump(host)}\n\n"
end
host_lost(host) click to toggle source
# File app/helpers/sse.rb, line 25
def host_lost(host)
  @out << "event: host_lost\ndata: #{json_dump(host)}\n\n"
end
host_up(host) click to toggle source
# File app/helpers/sse.rb, line 17
def host_up(host)
  @out << "event: host_up\ndata: #{json_dump(host)}\n\n"
end
keyspace_changed(keyspace) click to toggle source
# File app/helpers/sse.rb, line 33
def keyspace_changed(keyspace)
  @out << "event: keyspace_changed\ndata: #{json_dump(keyspace)}\n\n"
end
keyspace_created(keyspace) click to toggle source
# File app/helpers/sse.rb, line 29
def keyspace_created(keyspace)
  @out << "event: keyspace_created\ndata: #{json_dump(keyspace)}\n\n"
end
keyspace_dropped(keyspace) click to toggle source
# File app/helpers/sse.rb, line 37
def keyspace_dropped(keyspace)
  @out << "event: keyspace_dropped\ndata: #{json_dump(keyspace)}\n\n"
end