Sha256: 4b5bb2ea56b65fd4342e8470c5fe19860b48781e88823553ec3619216c5fdb0c

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

module Fluent
  module Mixin
    module TypeConverter
      include Configurable
      include RecordFilterMixin
      include Fluent::TextParser::TypeConverter

      attr_accessor :types, :types_delimiter, :types_label_delimiter

      def configure(conf)
        super

      end

      def filter_record(tag, time, record)
        super
        if @types
          convert_field_type!(record)
        end
      end

      def convert_field_type!(record)
        record.each { |key, value|
          record[key] = convert_type(key, value)
        }
        self
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-mixin-type-converter-0.0.1 lib/fluent/mixin/type_converter.rb