Class: Fluent::ConvertToSha
- Inherits:
-
Output
- Object
- Output
- Fluent::ConvertToSha
- Defined in:
- lib/fluent/plugin/out_convert_to_sha.rb
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/fluent/plugin/out_convert_to_sha.rb', line 20 def configure(conf) super if @salt.strip.length == 0 raise Fluent::ConfigError, "require salt" end if @sha.to_s == '1' raise Fluent::ConfigError, "sha1 algorithm is vulnerable." end if @key.nil? raise Fluent::ConfigError, "require key name." end if @tag.to_s.length == 0 raise Fluent::ConfigError, "require tag name." end @mutex = Mutex.new end |
#emit(tag, es, chain) ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/fluent/plugin/out_convert_to_sha.rb', line 51 def emit(tag, es, chain) es.each do |time, record| Fluent::Engine.emit(@tag, time, convert_to_sha(record)) end chain.next end |
#shutdown ⇒ Object
47 48 49 |
# File 'lib/fluent/plugin/out_convert_to_sha.rb', line 47 def shutdown super end |
#start ⇒ Object
43 44 45 |
# File 'lib/fluent/plugin/out_convert_to_sha.rb', line 43 def start super end |