class Fluent::HttpHeartbeatInput::HeartbeatConnection

Public Instance Methods

on_read(data) click to toggle source
# File lib/fluent/plugin/in_http_heartbeat.rb, line 30
def on_read(data)
  body = "heartbeat"

  response = "HTTP/1.1 200\r\n"
  response << "Content-type: text/plain\r\n"
  response << "Content-length: " + body.bytesize.to_s + "\r\n"
  response << "\r\n"
  response << body
  write response
end
on_write_complete() click to toggle source
# File lib/fluent/plugin/in_http_heartbeat.rb, line 41
def on_write_complete
  close
end