Class: Fluent::InDatadogEvent

Inherits:
Input
  • Object
show all
Defined in:
lib/fluent/plugin/in_datadog_event.rb

Instance Method Summary collapse

Constructor Details

#initializeInDatadogEvent



21
22
23
24
25
# File 'lib/fluent/plugin/in_datadog_event.rb', line 21

def initialize
  super
  #
  require "dogapi"
end

Instance Method Details

#shutdownObject



33
34
35
36
# File 'lib/fluent/plugin/in_datadog_event.rb', line 33

def shutdown
  @finished = true
  @thread.join
end

#startObject



27
28
29
30
31
# File 'lib/fluent/plugin/in_datadog_event.rb', line 27

def start
  @dog = Dogapi::Client.new(@api_key, @app_key)
  @finished = false
  @thread = Thread.new(&method(:run))
end