Class: Fluent::YammerOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::YammerOutput
- Defined in:
- lib/fluent/plugin/out_yammer.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #create_message(message) ⇒ Object
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ YammerOutput
constructor
A new instance of YammerOutput.
Constructor Details
#initialize ⇒ YammerOutput
Returns a new instance of YammerOutput.
8 9 10 11 |
# File 'lib/fluent/plugin/out_yammer.rb', line 8 def initialize super require 'yammer' end |
Instance Method Details
#configure(conf) ⇒ Object
13 14 15 16 17 |
# File 'lib/fluent/plugin/out_yammer.rb', line 13 def configure(conf) super @yammer = Yammer::Client.new(:access_token => conf['access_token']) @group_id = conf['group_id'] end |
#create_message(message) ⇒ Object
27 28 29 30 31 |
# File 'lib/fluent/plugin/out_yammer.rb', line 27 def () @yammer.(, :group_id => @group_id) rescue Yammer::Error => e $log.error("Yammer Error: #{e.}") end |
#emit(tag, es, chain) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/fluent/plugin/out_yammer.rb', line 19 def emit(tag, es, chain) es.each do |time, record| (record['message']) end chain.next end |