Class: LogStash::Filters::Memcached
- Inherits:
-
Base
- Object
- Base
- LogStash::Filters::Memcached
- Defined in:
- lib/logstash/filters/memcached.rb
Overview
This filter provides facilities to interact with Memcached.
Instance Attribute Summary collapse
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
Instance Method Summary collapse
-
#close ⇒ Object
def filter.
-
#filter(event) ⇒ Object
def register.
- #register ⇒ Object
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
72 73 74 |
# File 'lib/logstash/filters/memcached.rb', line 72 def cache @cache end |
Instance Method Details
#close ⇒ Object
def filter
90 91 92 |
# File 'lib/logstash/filters/memcached.rb', line 90 def close cache.close end |
#filter(event) ⇒ Object
def register
83 84 85 86 87 88 |
# File 'lib/logstash/filters/memcached.rb', line 83 def filter(event) set_success = do_set(event) get_success = do_get(event) filter_matched(event) if (set_success || get_success) end |
#register ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/logstash/filters/memcached.rb', line 74 def register if @ttl < 0 logger.error("ttl cannot be negative") fail("invalid ttl: cannot be negative") end @cache = establish_connection end |