logstash/lib/net/messages/search.rb
Jordan Sissel 434a633013 - hashbind is back! Dynamically generate methods that we would normally
hand-code. This method is as fast as the hand-coded method and with less
  writing.
- Make message registration easier with a simple 'register' function:
  class Foo < Message
    register
  end

  We dynamically generate the message 'type' by the class name.
2009-09-10 09:59:24 +00:00

22 lines
564 B
Ruby

require "lib/net/message"
module LogStash; module Net; module Messages
class SearchRequest < RequestMessage
register
# Message attributes
hashbind :query, "/args/query"
hashbind :log_type, "/args/log_type"
hashbind :offset, "/args/offset"
hashbind :limit, "/args/limit"
end # class SearchRequest
class SearchResponse < ResponseMessage
register
# Message attributes
hashbind :results, "/args/results"
hashbind :finished, "/args/finished"
end # class SearchResponse
end; end; end # module LogStash::Net::Messages