Class: LogStash::Inputs::IdentityMapCodecComponent

Inherits:
Object
  • Object
show all
Includes:
Component
Defined in:
lib/logstash/inputs/identity_map_codec_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codecObject (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

#stopObject



15
16
17
# File 'lib/logstash/inputs/identity_map_codec_component.rb', line 15

def stop
  @codec.close
end