Skip to content

Commit

Permalink
filter: lua: fix markdown formatting (fluent#142)
Browse files Browse the repository at this point in the history
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
  • Loading branch information
ialidzhikov authored and edsiper committed Feb 26, 2019
1 parent d3f8113 commit 431b627
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filter/lua.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ In your main configuration file append the following _Input_, _Filter_ & _Output
The life cycle of a filter have the following steps:

* Upon Tag matching by filter\_lua, it may process or bypass the record.
* If filter_lua accepts the record, it will invoke the function defined in the \_call_ property which basically is the name of a function defined in the Lua _script_.
* If filter\_lua accepts the record, it will invoke the function defined in the _call_ property which basically is the name of a function defined in the Lua _script_.
* Invoke Lua function passing each record in JSON format.
* Upon return, validate return value and take some action \(described above\)

Expand Down Expand Up @@ -87,7 +87,7 @@ Each callback **must** return three values:

| name | data type | description |
| :--- | :--- | :--- |
| code | integer | The code return value represents the result and further action that may follows. If _code_ equals -1, means that filter_lua must drop the record. If \_code_ equals 0 the record will not be modified, otherwise if _code_ equals 1, means the original timestamp or record have been modified so it must be replaced by the returned values from _timestamp_ \(second return value\) and _record_ \(third return value\). |
| code | integer | The code return value represents the result and further action that may follows. If _code_ equals -1, means that filter\_lua must drop the record. If _code_ equals 0 the record will not be modified, otherwise if _code_ equals 1, means the original timestamp or record have been modified so it must be replaced by the returned values from _timestamp_ \(second return value\) and _record_ \(third return value\). |
| timestamp | double | If code equals 1, the original record timestamp will be replaced with this new value. |
| record | table | if code equals 1, the original record information will be replaced with this new value. Note that the format of this value **must** be a valid Lua table. |

Expand Down

0 comments on commit 431b627

Please sign in to comment.