Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filter_lua: Add chunk mode for processing multiple records
This commit will introduce a chunk_mode for lua filter. It can be needed for use cases like parallelization (see lua lanes). Please note that the lua functions will take only two arguments: function process_records(tag, records) if records and type(records) == "table" then for i, record_row in ipairs(records) do local timestamp = record_row.timestamp local record = record_row.record print("Timestamp entry:", timestamp.sec, timestamp.nsec) print("Record entry:", record.message) end else print("Error: Invalid 'records' table or nil") end return records end The returned table must be in the same format (table of timestamp and record pairs). This mode currently only supports time_as_table by default and does always emit the returned records. There is no return code to be set. Signed-off-by: Richard Treu <[email protected]>
- Loading branch information