Class: Fluent::UpsolverOutput

Inherits:
BufferedOutput
  • Object
show all
Defined in:
lib/fluent/plugin/out_upsolver.rb

Instance Method Summary collapse

Constructor Details

#initializeUpsolverOutput

Returns a new instance of UpsolverOutput.



4
5
6
7
# File 'lib/fluent/plugin/out_upsolver.rb', line 4

def initialize
  super
  require 'curb'
end

Instance Method Details

#configure(conf) ⇒ Object



11
12
13
# File 'lib/fluent/plugin/out_upsolver.rb', line 11

def configure(conf)
  super
end

#endObject



19
20
21
# File 'lib/fluent/plugin/out_upsolver.rb', line 19

def end
  super
end

#format(tag, time, record) ⇒ Object



23
24
25
# File 'lib/fluent/plugin/out_upsolver.rb', line 23

def format(tag, time, record)
  {:tag => tag, :time => time, :record => record }.to_json + "\n"
end

#startObject



15
16
17
# File 'lib/fluent/plugin/out_upsolver.rb', line 15

def start
  super
end

#write(chunk) ⇒ Object



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

def write(chunk)
  data = chunk.read
  Curl.post(@endpoint_url, data)
end