Module: Fluent::GCS

Defined in:
lib/fluent/plugin/gcs/object_creator.rb

Defined Under Namespace

Classes: GZipCommandObjectCreator, GZipObjectCreator, JSONObjectCreator, ObjectCreator, TextObjectCreator

Class Method Summary collapse

Class Method Details

.discovered_object_creator(store_as, transcoding: nil, command_parameter: nil, log: nil) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/fluent/plugin/gcs/object_creator.rb', line 8

def self.discovered_object_creator(store_as, transcoding: nil, command_parameter: nil, log: nil)
  case store_as
  when :gzip
    Fluent::GCS::GZipObjectCreator.new(transcoding)
  when :gzip_command
    Fluent::GCS::GZipCommandObjectCreator.new(
      transcoding: transcoding,
      command_parameter: command_parameter,
      log: log
    )
  when :json
    Fluent::GCS::JSONObjectCreator.new
  when :text
    Fluent::GCS::TextObjectCreator.new
  end
end