Class: Mysql::BinlogQueryDispatcher
- Inherits:
-
Object
- Object
- Mysql::BinlogQueryDispatcher
- Defined in:
- lib/flydata/fluent-plugins/mysql/binlog_query_dispatcher.rb
Direct Known Subclasses
Instance Method Summary collapse
- #dispatch(record) ⇒ Object
-
#initialize ⇒ BinlogQueryDispatcher
constructor
A new instance of BinlogQueryDispatcher.
Constructor Details
#initialize ⇒ BinlogQueryDispatcher
Returns a new instance of BinlogQueryDispatcher.
5 6 7 |
# File 'lib/flydata/fluent-plugins/mysql/binlog_query_dispatcher.rb', line 5 def initialize @handlers = [] end |
Instance Method Details
#dispatch(record) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/flydata/fluent-plugins/mysql/binlog_query_dispatcher.rb', line 9 def dispatch(record) @handlers.each do |handler| query = normalize_query(record["query"]) if (handler.pattern.match(query)) handler.process(record, query) break end end end |