Class: Fluent::Plugin::InHttpParser

Inherits:
Parser show all
Defined in:
lib/fluent/plugin/in_http.rb

Constant Summary

Constants inherited from Parser

Parser::AVAILABLE_PARSER_VALUE_TYPES, Parser::PARSER_TYPES, Parser::TRUTHY_VALUES

Constants included from Configurable

Configurable::CONFIG_TYPE_REGISTRY

Instance Attribute Summary

Attributes inherited from Parser

#type_converters

Attributes inherited from Base

#under_plugin_development

Instance Method Summary collapse

Methods inherited from Parser

#build_type_converters, #call, #convert_values, #implement?, #initialize, #parse_io, #parse_partial_data, #parse_time, #parse_with_timeout, #parser_type, #start, #stop, #string_like_null

Methods included from TimeMixin::Parser

included, #time_parser_create

Methods included from OwnedByMixin

#log, #owner, #owner=

Methods inherited from Base

#acquire_worker_lock, #after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #called_in_test?, #close, #closed?, #configured?, #context_router, #context_router=, #fluentd_worker_id, #get_lock_path, #has_router?, #initialize, #inspect, #multi_workers_ready?, #plugin_root_dir, #reloadable_plugin?, #shutdown, #shutdown?, #start, #started?, #stop, #stopped?, #string_safe_encoding, #terminate, #terminated?

Methods included from SystemConfig::Mixin

#system_config, #system_config_override

Methods included from Configurable

#config, #configure_proxy_generate, #configured_section_create, included, #initialize, lookup_type, register_type

Constructor Details

This class inherits a constructor from Fluent::Plugin::Parser

Instance Method Details

#configure(conf) ⇒ Object



33
34
35
36
37
38
39
40
41
42
# File 'lib/fluent/plugin/in_http.rb', line 33

def configure(conf)
  super

  # if no time parser related parameters, use in_http's time convert rule
  @time_parser = if conf.has_key?('time_type') || conf.has_key?('time_format')
                   time_parser_create
                 else
                   nil
                 end
end

#get_time_parserObject



49
50
51
# File 'lib/fluent/plugin/in_http.rb', line 49

def get_time_parser
  @time_parser
end

#parse(text) {|nil, nil| ... } ⇒ Object

Yields:

  • (nil, nil)


44
45
46
47
# File 'lib/fluent/plugin/in_http.rb', line 44

def parse(text)
  # this plugin is dummy implementation not to raise error
  yield nil, nil
end