Class: LogStash::Inputs::HTTP_Poller
- Inherits:
-
Base
- Object
- Base
- LogStash::Inputs::HTTP_Poller
- Includes:
- PluginMixins::HttpClient
- Defined in:
- lib/logstash/inputs/http_poller.rb
Instance Method Summary collapse
Instance Method Details
#register ⇒ Object
99 100 101 102 103 104 105 106 |
# File 'lib/logstash/inputs/http_poller.rb', line 99 def register @host = Socket.gethostname.force_encoding(Encoding::UTF_8) @logger.info("Registering http_poller Input", :type => @type, :urls => @urls, :interval => @interval, :timeout => @timeout) setup_requests! end |
#run(queue) ⇒ Object
161 162 163 164 165 166 |
# File 'lib/logstash/inputs/http_poller.rb', line 161 def run(queue) @interval_thread = Thread.current Stud.interval(@interval) do run_once(queue) end end |
#stop ⇒ Object
108 109 110 |
# File 'lib/logstash/inputs/http_poller.rb', line 108 def stop Stud.stop!(@interval_thread) if @interval_thread end |