add docs for filter.expr and wrapped payload stuff

This commit is contained in:
Joel Wetzell
2026-03-16 18:21:36 -05:00
parent c6c357747f
commit 064b74e30a
2 changed files with 28 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
---
title: Payload
sidebar:
order: 5
---
[Processors](/concepts/Processors) operator on a "wrapped" version of the message produces by the module. This wrapped version is available to all processors and is defined as follows:
- **Payload**: the actual message produced by the module (or the result of the previous [processor](/concepts/processors) in the [route](/concepts/routes)).
- **Sender**: the network address of the module that produced the message (if applicable not all modules will have a sender address).
- **Modules**: a map of all [modules](/concepts/modules) in the router with the module id as the key and the module instance as the value.
@@ -0,0 +1,18 @@
---
title: Expr Filter
sidebar:
order: 2
---
The `filter.expr` processor evaluates an [Expr expression](https://expr-lang.org/playground). If the expression evaluates to true then the payload is sent through. This processor will return an error if the expression fails to evaluate.
- **type**: `filter.expr`
- **params**:
- **expression**: [Expr expression](https://expr-lang.org/playground) to evaluate. The expression has access to the [wrapped payload](/concepts/payload).
### Example
Match a payload great than or equal to 0
```
- type: filter.expr
params:
pattern: "Payload >= 0"
```