Class: Fluent::CloudwatchLogsInput
- Inherits:
-
Input
- Object
- Input
- Fluent::CloudwatchLogsInput
- Defined in:
- lib/fluent/plugin/in_cloudwatch_logs.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
-
#initialize ⇒ CloudwatchLogsInput
constructor
A new instance of CloudwatchLogsInput.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ CloudwatchLogsInput
Returns a new instance of CloudwatchLogsInput.
21 22 23 24 25 |
# File 'lib/fluent/plugin/in_cloudwatch_logs.rb', line 21 def initialize super require 'aws-sdk-core' end |
Instance Method Details
#configure(conf) ⇒ Object
27 28 29 30 |
# File 'lib/fluent/plugin/in_cloudwatch_logs.rb', line 27 def configure(conf) super configure_parser(conf) end |
#shutdown ⇒ Object
43 44 45 46 |
# File 'lib/fluent/plugin/in_cloudwatch_logs.rb', line 43 def shutdown @finished = true @thread.join end |
#start ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/fluent/plugin/in_cloudwatch_logs.rb', line 32 def start = {} [:credentials] = Aws::Credentials.new(@aws_key_id, @aws_sec_key) if @aws_key_id && @aws_sec_key [:region] = @region if @region [:http_proxy] = @http_proxy if @http_proxy @logs = Aws::CloudWatchLogs::Client.new() @finished = false @thread = Thread.new(&method(:run)) end |