Class: LogStash::Inputs::IdentityMapCodecComponent
- Inherits:
-
Object
- Object
- LogStash::Inputs::IdentityMapCodecComponent
- Includes:
- Component
- Defined in:
- lib/logstash/inputs/identity_map_codec_component.rb
Instance Attribute Summary collapse
-
#codec ⇒ Object
readonly
Returns the value of attribute codec.
Instance Method Summary collapse
- #add_codec(codec) ⇒ Object
- #do_work(context, data) ⇒ Object
- #process(context, data) ⇒ Object
- #stop ⇒ Object
Instance Attribute Details
#codec ⇒ Object (readonly)
Returns the value of attribute codec.
8 9 10 |
# File 'lib/logstash/inputs/identity_map_codec_component.rb', line 8 def codec @codec end |
Instance Method Details
#add_codec(codec) ⇒ Object
10 11 12 13 |
# File 'lib/logstash/inputs/identity_map_codec_component.rb', line 10 def add_codec(codec) @codec = LogStash::Codecs::IdentityMapCodec.new(codec) self end |
#do_work(context, data) ⇒ Object
19 20 21 |
# File 'lib/logstash/inputs/identity_map_codec_component.rb', line 19 def do_work(context, data) do_line(context, data) || do_eviction(context, data) end |
#process(context, data) ⇒ Object
23 24 25 26 |
# File 'lib/logstash/inputs/identity_map_codec_component.rb', line 23 def process(context, data) # data should be an event deliver(context, data) end |
#stop ⇒ Object
15 16 17 |
# File 'lib/logstash/inputs/identity_map_codec_component.rb', line 15 def stop @codec.close end |